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 classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionboolean[][]static final StringStores 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 TypeMethodDescriptionbooleanvoidapplyDrawInterpolation(float interpolatedTime) buildTower(TowerType towerType, Tower.AimStrategy aimStrategy, int x, int y) voidbuildTowerAction(TowerType towerType, Tower.AimStrategy aimStrategy, int x, int y) voidbuildTowerActionOnSelectedTile(TowerType towerType) voidbuildTowerActionWithAimStrategy(TowerType towerType, Tower.AimStrategy aimStrategy) buildTowerIgnorePrice(TowerType towerType, Tower.AimStrategy aimStrategy, int x, int y, boolean ignorePrice) Строит башню сразу.booleanvoidcustomTowerButtonAction(Tower tower, int mapX, int mapY) voidcustomTowerButtonActionAt(int x, int y, int mapX, int mapY) voiddispose()Releases all resources of this object.voiddrawBatchAdditive(Batch batch, float deltaTime) voiddrawRanges(Batch batch) voiddrawWeapons(Batch batch, float deltaTime) intgetBaseUpgradePrice(Tower tower, int toLevel) intgetGlobalUpgradePrice(TowerType towerType) floatgetMaxPossibleStat(TowerStatType statType) intgetUpgradePrice(Tower tower) voidbooleanisRegistered(Tower tower) voidPerforms the final configuration of the system.voidvoidvoidselectGlobalTowerAbilityAction(Tower tower, int abilityIdx) voidselectGlobalTowerAbilityActionAt(int x, int y, int abilityIdx) voidselectTowerAbilityAction(Tower tower, int abilityIdx) voidselectTowerAbilityActionAt(int x, int y, int abilityIdx) booleanvoidsellTowerAction(Tower tower) voidsetAbilityInstalled(Tower tower, int abilityIdx, boolean installed) voidsetDefaultAimStrategy(Tower.AimStrategy strategy) voidsetTowerAimStrategy(Tower tower, Tower.AimStrategy toStrategy) voidsetTowerAimStrategyAction(Tower tower, Tower.AimStrategy toStrategy) voidsetup()Performs the initial configuration of the system.voidvoidtraverseTilesInRange(Tower tower, ObjectFilter<Tile> cb) voidupdate(float deltaTime) voidПоказывает / скрывает партикл "доступен выбор умения"booleanupgradeTower(Tower tower) Мгновенно улучшить башню, если это возможно.voidupgradeTowerAction(Tower tower) voidupgradeTowerActionAt(int x, int y) voidMethods inherited from class com.prineside.tdi2.GameSystem
getFastStateHash, profileUpdateMethods 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:
writein interfaceKryoSerializable- Overrides:
writein classRegistrable
-
read
- Specified by:
readin interfaceKryoSerializable- Overrides:
readin classRegistrable
-
affectsGameState
public boolean affectsGameState()- Specified by:
affectsGameStatein classGameSystem
-
setup
public void setup()Description copied from class:GameSystemPerforms the initial configuration of the system. At the moment of call, systemProvider already contains all objects of systems.- Overrides:
setupin classGameSystem
-
postSetup
public void postSetup()Description copied from class:GameSystemPerforms the final configuration of the system. At the moment of call, all systems are already loaded and setup(), all listeners are already added.- Overrides:
postSetupin classGameSystem
-
postStateRestore
public void postStateRestore()- Overrides:
postStateRestorein 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
Мгновенно улучшить башню, если это возможно. Будут отняты монеты. -
sellTowerAction
-
sellTower
-
setTowerAimStrategyAction
-
setTowerAimStrategy
-
getUpgradePrice
-
getBaseUpgradePrice
-
getGlobalUpgradePrice
-
update
public void update(float deltaTime) - Overrides:
updatein classGameSystem
-
getSystemName
- Specified by:
getSystemNamein classGameSystem
-
drawBatchAdditive
-
drawRanges
-
applyDrawInterpolation
public void applyDrawInterpolation(float interpolatedTime) -
drawWeapons
-
traverseTilesInRange
-
updateAbilityAvailableParticleEffect
Показывает / скрывает партикл "доступен выбор умения" -
dispose
public void dispose()Description copied from interface:com.badlogic.gdx.utils.DisposableReleases all resources of this object.- Specified by:
disposein interfaceDisposable- Overrides:
disposein classGameSystem
-