Package com.prineside.tdi2.systems
Class GameValueSystem
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.GameSystem
com.prineside.tdi2.systems.GameValueSystem
- All Implemented Interfaces:
Disposable,KryoSerializable,GameValueProvider
public final class GameValueSystem
extends GameSystem
implements GameValueProvider, KryoSerializable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic class -
Field Summary
Fields inherited from class com.prineside.tdi2.Registrable
S -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCustomGameValue(GameValueConfig config) booleanaddGlobalTowerStatMutator(TowerStatType towerStatType, GameValueSystem.GlobalTowerStatMutator mutator) booleanbooleanfloatfloatgetFloatValueSum(GameValueType gv1, GameValueType gv2) If not set yet, generates snapshot on demand, based on the current difficulty mode, level, gameStartProgressSnapshot and TargetTile config.floatgetGlobalTowerStatMutators(TowerStatType towerStatType) intintgetIntValueSum(GameValueType gv1, GameValueType gv2) doubledoubledoubleintfloatdoublevoidvoidВызывать всегда, когда поменялась конфигурация во время игры (сменился эффект тайла и т.п.)voidvoidremoveCustomGameValue(GameValueConfig config) booleanremoveGlobalTowerStatMutator(TowerStatType towerStatType, GameValueSystem.GlobalTowerStatMutator mutator) voidSet snapshot manually.voidsetup()Performs the initial configuration of the system.voidMethods inherited from class com.prineside.tdi2.GameSystem
dispose, getFastStateHash, postSetup, postStateRestore, profileUpdate, updateMethods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered
-
Constructor Details
-
GameValueSystem
public GameValueSystem()
-
-
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
-
getGlobalStatMultiplier
-
addGlobalTowerStatMutator
public boolean addGlobalTowerStatMutator(TowerStatType towerStatType, GameValueSystem.GlobalTowerStatMutator mutator) -
removeGlobalTowerStatMutator
public boolean removeGlobalTowerStatMutator(TowerStatType towerStatType, GameValueSystem.GlobalTowerStatMutator mutator) -
getGlobalTowerStatMutators
public Array<GameValueSystem.GlobalTowerStatMutator> getGlobalTowerStatMutators(TowerStatType towerStatType) -
recalculateGlobalTowerStatMultipliers
public void recalculateGlobalTowerStatMultipliers() -
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
-
getSystemName
- Specified by:
getSystemNamein classGameSystem
-
getGlobalSnapshot
If not set yet, generates snapshot on demand, based on the current difficulty mode, level, gameStartProgressSnapshot and TargetTile config. -
setGlobalSnapshot
Set snapshot manually. Don't forget to call `recalculate()` after.- Parameters:
snapshot- the snapshot. If null, next time `getGlobalSnapshot()` is called, a new default global snapshot will be auto-generated
-
getSnapshot
-
getTickRate
public int getTickRate() -
getTickRateDeltaTime
public float getTickRateDeltaTime() -
recalculate
public void recalculate()Вызывать всегда, когда поменялась конфигурация во время игры (сменился эффект тайла и т.п.) -
addCustomGameValue
-
removeCustomGameValue
-
getValue
- Specified by:
getValuein interfaceGameValueProvider
-
getFloatValue
- Specified by:
getFloatValuein interfaceGameValueProvider
-
getBooleanValue
- Specified by:
getBooleanValuein interfaceGameValueProvider
-
getIntValue
- Specified by:
getIntValuein interfaceGameValueProvider
-
getIntValueSum
- Specified by:
getIntValueSumin interfaceGameValueProvider
-
getFloatValueSum
- Specified by:
getFloatValueSumin interfaceGameValueProvider
-
getPercentValueAsMultiplier
- Specified by:
getPercentValueAsMultiplierin interfaceGameValueProvider
-
getPercentValueAsMultiplierSum
- Specified by:
getPercentValueAsMultiplierSumin interfaceGameValueProvider
-
getPercentValueAsMultiplierSumAll
- Specified by:
getPercentValueAsMultiplierSumAllin interfaceGameValueProvider
-