Package com.prineside.tdi2
Class Miner
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.Miner
- All Implemented Interfaces:
 KryoSerializable
- Direct Known Subclasses:
 InfiarMiner,MatrixMiner,ScalarMiner,TensorMiner,VectorMiner
- 
Nested Class Summary
Nested Classes - 
Field Summary
FieldsModifier and TypeFieldDescriptionfloatfloatintfloatintstatic final intint[]floatAccumulated time of the next resource minedintlongFields inherited from class com.prineside.tdi2.Registrable
S - 
Method Summary
Modifier and TypeMethodDescriptionvoiddrawBase(Batch batch, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) voiddrawBatch(Batch batch, float x, float y, float size, float deltaTime, MapRenderingSystem.DrawMode drawMode) abstract intgetBaseUpgradePrice(int level) floatintfloatfloatintgetTile()intfloatbooleanvoidloadFromJson(JsonValue value) voidvoidvoidreduceInstallTime(float time) voidbooleanvoidsetInstallTime(float time) voidsetTile(SourceTile tile) voidsetUpgradeLevel(int level) voidvoidvoidupdatePieChart(float centerX, float centerY, float scale) voidMethods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered 
- 
Field Details
- 
MAX_UPGRADE_LEVEL
public static final int MAX_UPGRADE_LEVEL- See Also:
 
 - 
id
public int id - 
type
 - 
moneySpentOn
public int moneySpentOn - 
existsTime
public float existsTime - 
totalScoreGained
public long totalScoreGained - 
minedResources
public int[] minedResources - 
lastMinedItemTime
public float lastMinedItemTime - 
nearbyModifiers
 - 
nextMinedResourceType
 - 
miningTime
public float miningTimeAccumulated time of the next resource mined - 
doubleSpeedTimeLeft
public float doubleSpeedTimeLeft - 
loopAbilityResourceBuffer
public int loopAbilityResourceBuffer - 
affectedByLoopAbility
 - 
doubleSpeedParticle
 
 - 
 - 
Method Details
- 
write
- Specified by:
 writein interfaceKryoSerializable- Overrides:
 writein classRegistrable
 - 
read
- Specified by:
 readin interfaceKryoSerializable- Overrides:
 readin classRegistrable
 - 
toJson
 - 
drawBase
public void drawBase(Batch batch, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode)  - 
updateCache
public void updateCache() - 
getBaseUpgradePrice
public abstract int getBaseUpgradePrice(int level)  - 
setUpgradeLevel
public void setUpgradeLevel(int level)  - 
getUpgradeLevel
public int getUpgradeLevel() - 
getCurrentMiningSpeedFromSystem
public float getCurrentMiningSpeedFromSystem() - 
getInstallDuration
public int getInstallDuration()- Returns:
 - time required to install the miner, in seconds
 
 - 
getSellPrice
public int getSellPrice() - 
isPrepared
public boolean isPrepared()- Returns:
 - true if miner is already installed and is mining resources
 
 - 
getPreparationProgress
public float getPreparationProgress() - 
setInstallTime
public void setInstallTime(float time)  - 
reduceInstallTime
public void reduceInstallTime(float time)  - 
getInstallTimeLeft
public float getInstallTimeLeft() - 
getVisualMiningProgress
public float getVisualMiningProgress() - 
getTile
 - 
setTile
 - 
updatePieChart
public void updatePieChart(float centerX, float centerY, float scale)  - 
placedOnMap
public void placedOnMap() - 
removedFromMap
public void removedFromMap() - 
drawBatch
public void drawBatch(Batch batch, float x, float y, float size, float deltaTime, MapRenderingSystem.DrawMode drawMode)  - 
loadFromJson
 - 
cloneMiner
 - 
sameAs
 
 -