Class TowerSystem

All Implemented Interfaces:
Disposable, KryoSerializable

public final class TowerSystem extends GameSystem
  • Field Details

    • TOWER_OUT_OF_ORDER_REASON_MANUAL

      public static final String TOWER_OUT_OF_ORDER_REASON_MANUAL
      See Also:
    • towerAbilityCategoryRules

      public TowerSystem.TowerAbilityCategoryRule[] towerAbilityCategoryRules
      Stores configuration for tower abilities, can be modified at the start of the run. Index in this array must correspond to the category ID, starts with 0.
    • towerAbilityIdxToCategory

      public int[] towerAbilityIdxToCategory
      Tower ability index to category defined in the previous field
    • canTowerAttackEnemy

      public boolean[][] canTowerAttackEnemy
    • towerEnemyDamageMultiplier

      public float[][] towerEnemyDamageMultiplier
    • towers

      public DelayedRemovalArray<Tower> towers
  • Constructor Details

    • TowerSystem

      public TowerSystem()
  • Method Details

    • write

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

      public void read(Kryo kryo, Input input)
      Specified by:
      read in interface 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
      Performs the initial configuration of the system. At the moment of call, systemProvider already contains all objects of systems.
      Overrides:
      setup in class GameSystem
    • postSetup

      public void postSetup()
      Description copied from class: GameSystem
      Performs the final configuration of the system. At the moment of call, all systems are already loaded and setup(), all listeners are already added.
      Overrides:
      postSetup in class GameSystem
    • postStateRestore

      public void postStateRestore()
      Overrides:
      postStateRestore in class GameSystem
    • isRegistered

      public boolean isRegistered(Tower tower)
    • getMaxPossibleStat

      public float getMaxPossibleStat(TowerStatType statType)
    • getDefaultAimStrategy

      public Tower.AimStrategy getDefaultAimStrategy()
    • setDefaultAimStrategy

      public void setDefaultAimStrategy(Tower.AimStrategy strategy)
    • selectTowerAbilityAction

      public void selectTowerAbilityAction(Tower tower, int abilityIdx)
    • selectGlobalTowerAbilityAction

      public void selectGlobalTowerAbilityAction(Tower tower, int abilityIdx)
    • customTowerButtonAction

      public void customTowerButtonAction(Tower tower, int mapX, int mapY)
    • customTowerButtonActionAt

      public void customTowerButtonActionAt(int x, int y, int mapX, int mapY)
    • selectTowerAbilityActionAt

      public void selectTowerAbilityActionAt(int x, int y, int abilityIdx)
    • selectGlobalTowerAbilityActionAt

      public void selectGlobalTowerAbilityActionAt(int x, int y, int abilityIdx)
    • setAbilityInstalled

      public void setAbilityInstalled(Tower tower, int abilityIdx, boolean installed)
    • buildTowerActionOnSelectedTile

      public void buildTowerActionOnSelectedTile(TowerType towerType)
    • canTowersBeManuallyDisabled

      public boolean canTowersBeManuallyDisabled()
    • toggleTowerEnabledAction

      public void toggleTowerEnabledAction()
    • buildTowerActionWithAimStrategy

      public void buildTowerActionWithAimStrategy(TowerType towerType, Tower.AimStrategy aimStrategy)
    • buildTowerAction

      public void buildTowerAction(TowerType towerType, Tower.AimStrategy aimStrategy, int x, int y)
    • buildTower

      public Tower buildTower(TowerType towerType, @Null Tower.AimStrategy aimStrategy, int x, int y)
    • buildTowerIgnorePrice

      public Tower buildTowerIgnorePrice(TowerType towerType, @Null Tower.AimStrategy aimStrategy, int x, int y, boolean ignorePrice)
      Строит башню сразу. Чтобы не угробить синхронизацию, этот метод не должен вызываться от времени / действий игрока.
    • upgradeTowerAction

      public void upgradeTowerAction(Tower tower)
    • upgradeTowerActionAt

      public void upgradeTowerActionAt(int x, int y)
    • globalUpgradeTowerAction

      public void globalUpgradeTowerAction(TowerType type)
    • upgradeTower

      public boolean upgradeTower(Tower tower)
      Мгновенно улучшить башню, если это возможно. Будут отняты монеты.
    • sellTowerAction

      public void sellTowerAction(Tower tower)
    • sellTower

      public boolean sellTower(Tower tower)
    • setTowerAimStrategyAction

      public void setTowerAimStrategyAction(Tower tower, Tower.AimStrategy toStrategy)
    • setTowerAimStrategy

      public void setTowerAimStrategy(Tower tower, Tower.AimStrategy toStrategy)
    • getUpgradePrice

      public int getUpgradePrice(Tower tower)
    • getBaseUpgradePrice

      public int getBaseUpgradePrice(Tower tower, int toLevel)
    • getGlobalUpgradePrice

      public int getGlobalUpgradePrice(TowerType towerType)
    • update

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

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

      public void drawBatchAdditive(Batch batch, float deltaTime)
    • drawRanges

      public void drawRanges(Batch batch)
    • applyDrawInterpolation

      public void applyDrawInterpolation(float interpolatedTime)
    • drawWeapons

      public void drawWeapons(Batch batch, float deltaTime)
    • traverseTilesInRange

      public void traverseTilesInRange(Tower tower, ObjectFilter<Tile> cb)
    • updateAbilityAvailableParticleEffect

      public void updateAbilityAvailableParticleEffect(Tower tower)
      Показывает / скрывает партикл "доступен выбор умения"
    • dispose

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