Class MinerSystem

All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, com.esotericsoftware.kryo.KryoSerializable

public final class MinerSystem extends GameSystem
  • Field Details

  • Constructor Details

    • MinerSystem

      public MinerSystem()
  • Method Details

    • write

      public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output)
      Specified by:
      write in interface com.esotericsoftware.kryo.KryoSerializable
      Overrides:
      write in class Registrable
    • read

      public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input)
      Specified by:
      read in interface com.esotericsoftware.kryo.KryoSerializable
      Overrides:
      read in class Registrable
    • affectsGameState

      public boolean affectsGameState()
      Specified by:
      affectsGameState in class GameSystem
    • setup

      public void setup()
      Description copied from class: GameSystem
      Произвести начальную настройку системы. На момент вызова этого метода, systemProvider содержит объекты всех систем.
      Overrides:
      setup in class GameSystem
    • getBonusDoubleMiningSpeedTimeLeft

      public float getBonusDoubleMiningSpeedTimeLeft()
    • isRegistered

      public boolean isRegistered(Tower tower)
    • register

      public void register(Miner miner)
    • unregister

      public void unregister(Miner miner)
    • addResources

      public void addResources(Miner miner, ResourceType resourceType, int amount, boolean mined)
    • removeResources

      public boolean removeResources(Miner miner, ResourceType resourceType, int amount)
    • getMaxUpgradeLevel

      public int getMaxUpgradeLevel(MinerType minerType)
    • getGlobalUpgradePrice

      public int getGlobalUpgradePrice(MinerType minerType)
    • getMaxMinersCount

      public int getMaxMinersCount(MinerType minerType)
      Возвращает количество майнеров, которые вообще могут быть построены
    • getBuildableMinersCount

      public int getBuildableMinersCount(MinerType minerType)
      Возвращает количество майнеров, которые еще могут быть построены
    • getBuildPrice

      public int getBuildPrice(MinerType minerType)
    • getUpgradePrice

      public int getUpgradePrice(Miner miner)
    • upgradeMinerAction

      public void upgradeMinerAction(Miner miner)
    • upgradeMinerAction

      public void upgradeMinerAction(int x, int y)
    • globalUpgradeMinerAction

      public void globalUpgradeMinerAction(MinerType type)
    • upgradeMiner

      public void upgradeMiner(Miner miner)
    • upgradeMiner

      public void upgradeMiner(int x, int y)
    • buildMinerAction

      public void buildMinerAction(MinerType minerType)
      На текущем выбранном тайле
    • buildMinerAction

      public void buildMinerAction(MinerType minerType, int x, int y)
    • buildMiner

      @Null public Miner buildMiner(MinerType minerType, int x, int y, boolean checkMinerCountLimit, boolean costsCoins)
    • sellMinerAction

      public void sellMinerAction(Miner miner)
    • sellMinerAction

      public void sellMinerAction(int x, int y)
    • sellMiner

      public void sellMiner(int x, int y)
    • getMiningSpeed

      public float getMiningSpeed(Miner miner, ResourceType resourceType, int upgradeLevel)
      Скорость добычи ресурса с учетом уровня башни и плотности ресурсов, ресурсов в секунду
    • update

      public void update(float deltaTime)
      Overrides:
      update in class GameSystem
    • getSystemName

      public String getSystemName()
      Specified by:
      getSystemName in class GameSystem
    • drawBatch

      public void drawBatch(com.badlogic.gdx.graphics.g2d.Batch batch, float deltaTime)
    • dispose

      public void dispose()
      Description copied from interface: com.badlogic.gdx.utils.Disposable
      Releases all resources of this object.
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
      Overrides:
      dispose in class GameSystem