Package com.prineside.tdi2.systems
Class MinerSystem
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.GameSystem
com.prineside.tdi2.systems.MinerSystem
- All Implemented Interfaces:
Disposable,KryoSerializable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionfloatFields inherited from class com.prineside.tdi2.Registrable
S -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResources(Miner miner, ResourceType resourceType, int amount, boolean mined) booleanbuildMiner(MinerType minerType, int x, int y, boolean checkMinerCountLimit, boolean costsCoins) voidbuildMinerAction(MinerType minerType) На текущем выбранном тайлеvoidbuildMinerAction(MinerType minerType, int x, int y) floatcalculateScorePerMinute(Miner miner) voiddispose()Releases all resources of this object.static voiddrawBatch(Batch batch, Map map, float deltaTime, MapRenderingSystem.DrawMode drawMode) floatgetBaseMiningSpeed(Miner miner, int upgradeLevel) Resources/s, not affected by modifiers or double speedfloatintgetBuildableMinersCount(MinerType minerType) Возвращает количество майнеров, которые еще могут быть построеныintgetBuildPrice(MinerType minerType) intgetGlobalUpgradePrice(MinerType minerType) intgetMaxMinersCount(MinerType minerType) Возвращает количество майнеров, которые вообще могут быть построеныintgetMaxUpgradeLevel(MinerType minerType) floatgetMiningSpeed(Miner miner, int upgradeLevel) Resources/s, accounts for modifiers and bonus 2x speed Does not account for the accumulated 2x mining speed time of this minerintgetMiningSpeedModifierCount(Miner miner) floatfloatintgetResourceMinedRawScore(ResourceType resourceType) intgetUpgradePrice(Miner miner) voidbooleanisRegistered(Tower tower) voidvoidvoidbooleanremoveResources(Miner miner, ResourceType resourceType, int amount) booleansellMiner(int x, int y) voidsellMinerAction(int x, int y) voidsellMinerAction(Miner miner) voidsetup()Произвести начальную настройку системы.voidunregister(Miner miner) voidupdate(float deltaTime) booleanupgradeMiner(int x, int y) booleanupgradeMiner(Miner miner) voidupgradeMinerAction(int x, int y) voidupgradeMinerAction(Miner miner) voidMethods inherited from class com.prineside.tdi2.GameSystem
getFastStateHash, postSetup, profileUpdateMethods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered
-
Field Details
-
miners
-
bonusDoubleMiningSpeedTimeLeft
public float bonusDoubleMiningSpeedTimeLeft
-
-
Constructor Details
-
MinerSystem
public MinerSystem()
-
-
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:GameSystemПроизвести начальную настройку системы. На момент вызова этого метода, systemProvider содержит объекты всех систем.- Overrides:
setupin classGameSystem
-
postStateRestore
public void postStateRestore()- Overrides:
postStateRestorein classGameSystem
-
getBonusDoubleMiningSpeedTimeLeft
public float getBonusDoubleMiningSpeedTimeLeft() -
isRegistered
-
register
-
unregister
-
addResources
-
removeResources
-
getMaxUpgradeLevel
-
getGlobalUpgradePrice
-
getMaxMinersCount
Возвращает количество майнеров, которые вообще могут быть построены -
getBuildableMinersCount
Возвращает количество майнеров, которые еще могут быть построены -
getBuildPrice
-
getUpgradePrice
-
upgradeMinerAction
-
upgradeMinerAction
public void upgradeMinerAction(int x, int y) -
globalUpgradeMinerAction
-
upgradeMiner
-
upgradeMiner
public boolean upgradeMiner(int x, int y) -
buildMinerAction
На текущем выбранном тайле -
buildMinerAction
-
buildMiner
-
sellMinerAction
-
sellMinerAction
public void sellMinerAction(int x, int y) -
sellMiner
public boolean sellMiner(int x, int y) -
getResourceMinedRawScore
-
calculateScorePerMinute
-
getBaseMiningSpeed
Resources/s, not affected by modifiers or double speed -
getMiningSpeedModifierCount
-
getMiningSpeedModifierEfficiencyPerCount
public float getMiningSpeedModifierEfficiencyPerCount(int cnt) -
getMiningSpeedModifierMultiplier
-
getMiningSpeed
Resources/s, accounts for modifiers and bonus 2x speed Does not account for the accumulated 2x mining speed time of this miner -
update
public void update(float deltaTime) - Overrides:
updatein classGameSystem
-
getSystemName
- Specified by:
getSystemNamein classGameSystem
-
drawBatch
public static void drawBatch(Batch batch, Map map, float deltaTime, MapRenderingSystem.DrawMode drawMode) -
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
-