Package com.prineside.tdi2.modifiers
Class BalanceModifier
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.Building
com.prineside.tdi2.Modifier
com.prineside.tdi2.modifiers.BalanceModifier
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable,com.esotericsoftware.kryo.KryoSerializable,ScheduledUpdater.Updatable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumstatic classNested classes/interfaces inherited from class com.prineside.tdi2.Modifier
Modifier.ConnectionSide, Modifier.Factory<T extends Modifier>, Modifier.ModifierSidePair -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic float[]static int[]Fields inherited from class com.prineside.tdi2.Modifier
connectedSides, id, moneySpentOn, PENALTY_SELL_PRICE, timeSinceBuilt, type, WIRES_TEXTURES_CONFIGFields inherited from class com.prineside.tdi2.Building
buildingTypeFields inherited from class com.prineside.tdi2.Registrable
S -
Method Summary
Modifier and TypeMethodDescriptionvoidcustomButtonAction(int mapX, int mapY) voiddrawBatch(com.badlogic.gdx.graphics.g2d.Batch batch, float deltaTime, MapRenderingSystem.DrawMode drawMode) voidfillModifierMenu(com.badlogic.gdx.scenes.scene2d.Group container, com.badlogic.gdx.utils.ObjectMap<String, Object> elements) Добавить / обновить элементы в меню Вызывается каждый кадр, когда видно меню elements сохраняется между вызовами метода, чтобы не создавать актеров заново.intgetLevel()floatgetSpeed()XP/sintbooleanbooleanvoidread(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) voidsetLevel(int level) voidupdate(float deltaTime) voidupdateCustomButton(ComplexButton complexButton, boolean isPointing) voidwrite(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) Methods inherited from class com.prineside.tdi2.Modifier
cloneBuilding, dispose, drawBatchAdditive, getSellDelay, getSellPrice, getTimeTillSellAvailable, isSellAvailable, loadFromJson, nearbyBuildingsChanged, removedFromMap, scheduledUpdatableGetId, scheduledUpdatableSetId, scheduledUpdate, setSideConnected, toJsonMethods inherited from class com.prineside.tdi2.Building
drawBase, drawHoveredRange, drawSelectedRange, fromJson, getTile, placedOnMap, setTileMethods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered
-
Field Details
-
MAX_LEVEL
public static final int MAX_LEVEL- See Also:
-
XP_FOR_LEVEL
public static int[] XP_FOR_LEVEL -
SPEED_BY_LEVEL
public static float[] SPEED_BY_LEVEL -
mode
-
-
Method Details
-
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) -
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) -
getLevel
public int getLevel() -
setLevel
public void setLevel(int level) -
getXpEvolveRequirement
public int getXpEvolveRequirement() -
hasCustomButton
public boolean hasCustomButton()- Overrides:
hasCustomButtonin classModifier
-
isCustomButtonNeedMapPoint
public boolean isCustomButtonNeedMapPoint()- Overrides:
isCustomButtonNeedMapPointin classModifier
-
fillModifierMenu
public void fillModifierMenu(com.badlogic.gdx.scenes.scene2d.Group container, com.badlogic.gdx.utils.ObjectMap<String, Object> elements) Description copied from class:ModifierДобавить / обновить элементы в меню Вызывается каждый кадр, когда видно меню elements сохраняется между вызовами метода, чтобы не создавать актеров заново. Если он пустой - значит, вызвали первый раз и надо создать Можно не обновлять ничего, если состояние устраивает (можно хранить любые данные в elements, например хэш состояния или предыдущие значения)- Overrides:
fillModifierMenuin classModifier
-
customButtonAction
public void customButtonAction(int mapX, int mapY) - Overrides:
customButtonActionin classModifier
-
updateCustomButton
- Overrides:
updateCustomButtonin classModifier
-
getSpeed
public float getSpeed()XP/s -
update
public void update(float deltaTime) -
drawBatch
public void drawBatch(com.badlogic.gdx.graphics.g2d.Batch batch, float deltaTime, MapRenderingSystem.DrawMode drawMode)
-