Package com.prineside.tdi2.systems
Class TowerSystem
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.GameSystem
com.prineside.tdi2.systems.TowerSystem
- All Implemented Interfaces:
Disposable
,KryoSerializable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
static final class
static final class
static final class
static final class
static final class
static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean[][]
static final String
Stores configuration for tower abilities, can be modified at the start of the run.int[]
Tower ability index to category defined in the previous fieldfloat[][]
Fields inherited from class com.prineside.tdi2.Registrable
S
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
applyDrawInterpolation
(float interpolatedTime) buildTower
(TowerType towerType, Tower.AimStrategy aimStrategy, int x, int y) void
buildTowerAction
(TowerType towerType, Tower.AimStrategy aimStrategy, int x, int y) void
buildTowerActionOnSelectedTile
(TowerType towerType) void
buildTowerActionWithAimStrategy
(TowerType towerType, Tower.AimStrategy aimStrategy) buildTowerIgnorePrice
(TowerType towerType, Tower.AimStrategy aimStrategy, int x, int y, boolean ignorePrice) Строит башню сразу.boolean
void
customTowerButtonAction
(Tower tower, int mapX, int mapY) void
customTowerButtonActionAt
(int x, int y, int mapX, int mapY) void
dispose()
Releases all resources of this object.void
drawBatchAdditive
(Batch batch, float deltaTime) void
drawRanges
(Batch batch) void
drawWeapons
(Batch batch, float deltaTime) int
getBaseUpgradePrice
(Tower tower, int toLevel) int
getGlobalUpgradePrice
(TowerType towerType) float
getMaxPossibleStat
(TowerStatType statType) int
getUpgradePrice
(Tower tower) void
boolean
isRegistered
(Tower tower) void
Performs the final configuration of the system.void
void
void
selectGlobalTowerAbilityAction
(Tower tower, int abilityIdx) void
selectGlobalTowerAbilityActionAt
(int x, int y, int abilityIdx) void
selectTowerAbilityAction
(Tower tower, int abilityIdx) void
selectTowerAbilityActionAt
(int x, int y, int abilityIdx) boolean
void
sellTowerAction
(Tower tower) void
setAbilityInstalled
(Tower tower, int abilityIdx, boolean installed) void
setDefaultAimStrategy
(Tower.AimStrategy strategy) void
setTowerAimStrategy
(Tower tower, Tower.AimStrategy toStrategy) void
setTowerAimStrategyAction
(Tower tower, Tower.AimStrategy toStrategy) void
setup()
Performs the initial configuration of the system.void
void
traverseTilesInRange
(Tower tower, ObjectFilter<Tile> cb) void
update
(float deltaTime) void
Показывает / скрывает партикл "доступен выбор умения"boolean
upgradeTower
(Tower tower) void
upgradeTowerAction
(Tower tower) void
upgradeTowerActionAt
(int x, int y) boolean
upgradeTowerTakeCoins
(Tower tower, boolean takeCoins) void
Methods inherited from class com.prineside.tdi2.GameSystem
getFastStateHash, profileUpdate
Methods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered
-
Field Details
-
TOWER_OUT_OF_ORDER_REASON_MANUAL
- See Also:
-
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[] towerAbilityIdxToCategoryTower ability index to category defined in the previous field -
canTowerAttackEnemy
public boolean[][] canTowerAttackEnemy -
towerEnemyDamageMultiplier
public float[][] towerEnemyDamageMultiplier -
towers
-
-
Constructor Details
-
TowerSystem
public TowerSystem()
-
-
Method Details
-
write
- Specified by:
write
in interfaceKryoSerializable
- Overrides:
write
in classRegistrable
-
read
- Specified by:
read
in interfaceKryoSerializable
- Overrides:
read
in classRegistrable
-
affectsGameState
public boolean affectsGameState()- Specified by:
affectsGameState
in classGameSystem
-
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 classGameSystem
-
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 classGameSystem
-
postStateRestore
public void postStateRestore()- Overrides:
postStateRestore
in classGameSystem
-
isRegistered
-
getMaxPossibleStat
-
getDefaultAimStrategy
-
setDefaultAimStrategy
-
selectTowerAbilityAction
-
selectGlobalTowerAbilityAction
-
customTowerButtonAction
-
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
-
buildTowerActionOnSelectedTile
-
canTowersBeManuallyDisabled
public boolean canTowersBeManuallyDisabled() -
toggleTowerEnabledAction
public void toggleTowerEnabledAction() -
buildTowerActionWithAimStrategy
-
buildTowerAction
-
buildTower
-
buildTowerIgnorePrice
public Tower buildTowerIgnorePrice(TowerType towerType, @Null Tower.AimStrategy aimStrategy, int x, int y, boolean ignorePrice) Строит башню сразу. Чтобы не угробить синхронизацию, этот метод не должен вызываться от времени / действий игрока. -
upgradeTowerAction
-
upgradeTowerActionAt
public void upgradeTowerActionAt(int x, int y) -
globalUpgradeTowerAction
-
upgradeTower
-
upgradeTowerTakeCoins
-
sellTowerAction
-
sellTower
-
setTowerAimStrategyAction
-
setTowerAimStrategy
-
getUpgradePrice
-
getBaseUpgradePrice
-
getGlobalUpgradePrice
-
update
public void update(float deltaTime) - Overrides:
update
in classGameSystem
-
getSystemName
- Specified by:
getSystemName
in classGameSystem
-
drawBatchAdditive
-
drawRanges
-
applyDrawInterpolation
public void applyDrawInterpolation(float interpolatedTime) -
drawWeapons
-
traverseTilesInRange
-
updateAbilityAvailableParticleEffect
Показывает / скрывает партикл "доступен выбор умения" -
dispose
public void dispose()Description copied from interface:com.badlogic.gdx.utils.Disposable
Releases all resources of this object.- Specified by:
dispose
in interfaceDisposable
- Overrides:
dispose
in classGameSystem
-