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 TypeFieldDescriptionintintstatic final floatfloatboolean[]static final float[][]Fields inherited from class com.prineside.tdi2.Building
buildingTypeFields inherited from class com.prineside.tdi2.Registrable
S -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanvoidcustomButtonAction(int mapX, int mapY) voiddispose()voiddrawBatch(Batch batch, float deltaTime, MapRenderingSystem.DrawMode drawMode) voiddrawBatchAdditive(Batch batch, float deltaTime, MapRenderingSystem.DrawMode drawMode) voidfillModifierMenu(Group container, ObjectMap<String, Object> elements) Add / update menu elements.floatFor how long it will not be possible to sell the modifierintfloatfloatbooleanbooleanbooleanvoidloadFromJson(JsonValue value) voidbooleanvoidsetSideConnected(Modifier.ConnectionSide side, boolean connected) voidvoidupdate(float deltaTime) voidvoidupdateCustomButton(ComplexButton complexButton, boolean isPointing) voidMethods inherited from class com.prineside.tdi2.Building
drawBase, drawHoveredRange, drawSelectedRange, fromJson, getTile, placedOnMap, removedFromMap, setTileMethods 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:
writein interfaceKryoSerializable- Overrides:
writein classBuilding
-
read
- Specified by:
readin interfaceKryoSerializable- Overrides:
readin classBuilding
-
getWalkCost
public float getWalkCost()- Specified by:
getWalkCostin 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:
updateCachein 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:
cloneBuildingin classBuilding
-
update
public void update(float deltaTime) -
dispose
public void dispose() -
loadFromJson
-