Package com.prineside.tdi2
Class Modifier
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.Building
com.prineside.tdi2.Modifier
- All Implemented Interfaces:
KryoSerializable
- Direct Known Subclasses:
AttackSpeedModifier
,BalanceModifier
,BountyModifier
,DamageModifier
,ExperienceModifier
,MiningSpeedModifier
,PowerModifier
,SearchModifier
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionint
int
static final float
float
boolean[]
static final float[][]
Fields inherited from class com.prineside.tdi2.Building
buildingType
Fields inherited from class com.prineside.tdi2.Registrable
S
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
void
customButtonAction
(int mapX, int mapY) void
dispose()
void
drawBatch
(Batch batch, float deltaTime, MapRenderingSystem.DrawMode drawMode) void
drawBatchAdditive
(Batch batch, float deltaTime, MapRenderingSystem.DrawMode drawMode) void
fillModifierMenu
(Group container, ObjectMap<String, Object> elements) Add / update menu elements.float
For how long it will not be possible to sell the modifierint
float
float
boolean
boolean
boolean
void
loadFromJson
(JsonValue value) void
boolean
void
setSideConnected
(Modifier.ConnectionSide side, boolean connected) void
void
update
(float deltaTime) void
void
updateCustomButton
(ComplexButton complexButton, boolean isPointing) void
Methods inherited from class com.prineside.tdi2.Building
drawBase, drawHoveredRange, drawSelectedRange, fromJson, getTile, placedOnMap, removedFromMap, setTile
Methods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered
-
Field Details
-
PENALTY_SELL_PRICE
public static final float PENALTY_SELL_PRICE- See Also:
-
WIRES_TEXTURES_CONFIG
public static final float[][] WIRES_TEXTURES_CONFIG -
id
public int id -
type
-
timeSinceBuilt
public float timeSinceBuilt -
visuallyConnectedSides
public boolean[] visuallyConnectedSides -
moneySpentOn
public int moneySpentOn
-
-
Method Details
-
write
- Specified by:
write
in interfaceKryoSerializable
- Overrides:
write
in classBuilding
-
read
- Specified by:
read
in interfaceKryoSerializable
- Overrides:
read
in classBuilding
-
getWalkCost
public float getWalkCost()- Specified by:
getWalkCost
in classBuilding
-
setSideConnected
-
connectsToTowers
public boolean connectsToTowers() -
connectsToMiners
public boolean connectsToMiners() -
getSellDelay
public float getSellDelay()For how long it will not be possible to sell the modifier -
getTimeTillSellAvailable
public float getTimeTillSellAvailable() -
isSellAvailable
public boolean isSellAvailable() -
getSellPrice
public int getSellPrice() -
updateCache
public void updateCache()- Specified by:
updateCache
in classBuilding
-
fillModifierMenu
Add / update menu elements. Called each frame when the menu is visible. It is preferred to generate some kind of a menu's state hash and put it into the elements map. If hash has not changed since the last call, no change is required and this method can do nothing.- Parameters:
elements
- is preserved between method calls so you don't have to add new actors. If this array is empty, the menu has been just opened and all actors should be re-created
-
hasCustomButton
public boolean hasCustomButton() -
isCustomButtonNeedMapPoint
public boolean isCustomButtonNeedMapPoint() -
customButtonAction
public void customButtonAction(int mapX, int mapY) -
updateCustomButton
-
toJson
-
drawBatch
-
drawBatchAdditive
-
sameAs
-
cloneBuilding
- Specified by:
cloneBuilding
in classBuilding
-
update
public void update(float deltaTime) -
dispose
public void dispose() -
loadFromJson
-