Package com.prineside.tdi2
Class Miner
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.Miner
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
- Direct Known Subclasses:
InfiarMiner
,MatrixMiner
,ScalarMiner
,TensorMiner
,VectorMiner
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final com.badlogic.gdx.graphics.Color
com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect
float
float
int
float
static final int
int[]
float
int
com.badlogic.gdx.utils.DelayedRemovalArray<Modifier>
protected static final com.badlogic.gdx.utils.StringBuilder
Fields inherited from class com.prineside.tdi2.Registrable
S
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
drawBase
(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float size, MapRenderingSystem.DrawMode drawMode) void
drawBatch
(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float size, float deltaTime, MapRenderingSystem.DrawMode drawMode) protected void
drawPieChart
(com.badlogic.gdx.graphics.g2d.Batch batch, float centerX, float centerY, float scale, MapRenderingSystem.DrawMode drawMode) abstract int
getBaseUpgradePrice
(int level) float
int
float
float
int
getTile()
int
float
boolean
Возвращает true, если башня уже подготовлена и майнитvoid
loadFromJson
(com.badlogic.gdx.utils.JsonValue value) void
void
read
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) void
reduceInstallTime
(float time) void
void
setInstallTime
(float time) void
setTile
(SourceTile tile) void
setUpgradeLevel
(int level) void
toJson
(com.badlogic.gdx.utils.Json json) void
void
updatePieChart
(float centerX, float centerY, float scale) void
write
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) Methods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered
-
Field Details
-
MAX_UPGRADE_LEVEL
public static final int MAX_UPGRADE_LEVEL- See Also:
-
BACKGROUND_BASE_COLOR
protected static final com.badlogic.gdx.graphics.Color BACKGROUND_BASE_COLOR -
id
public int id -
type
-
moneySpentOn
public int moneySpentOn -
existsTime
public float existsTime -
minedResources
public int[] minedResources -
lastMinedItemTime
public float lastMinedItemTime -
nearbyModifiers
-
nextMinedResourceType
-
miningTime
public float miningTime -
doubleSpeedTimeLeft
public float doubleSpeedTimeLeft -
doubleSpeedParticle
public com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect doubleSpeedParticle -
sbDrawBase
protected static final com.badlogic.gdx.utils.StringBuilder sbDrawBase
-
-
Constructor Details
-
Miner
-
-
Method Details
-
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) - Specified by:
write
in interfacecom.esotericsoftware.kryo.KryoSerializable
- Overrides:
write
in classRegistrable
-
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
read
in interfacecom.esotericsoftware.kryo.KryoSerializable
- Overrides:
read
in classRegistrable
-
toJson
public void toJson(com.badlogic.gdx.utils.Json json) -
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:
- время в секундах, необходимое на установку майнера
-
getSellPrice
public int getSellPrice() -
isPrepared
public boolean isPrepared()Возвращает true, если башня уже подготовлена и майнит -
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) -
drawPieChart
protected void drawPieChart(com.badlogic.gdx.graphics.g2d.Batch batch, float centerX, float centerY, float scale, MapRenderingSystem.DrawMode drawMode) -
drawBase
protected void drawBase(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float size, MapRenderingSystem.DrawMode drawMode) -
placedOnMap
public void placedOnMap() -
removedFromMap
public void removedFromMap() -
drawBatch
public void drawBatch(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float size, float deltaTime, MapRenderingSystem.DrawMode drawMode) -
loadFromJson
public void loadFromJson(com.badlogic.gdx.utils.JsonValue value) -
cloneMiner
-