Class Modifier

All Implemented Interfaces:
KryoSerializable
Direct Known Subclasses:
AttackSpeedModifier, BalanceModifier, BountyModifier, DamageModifier, ExperienceModifier, MiningSpeedModifier, PowerModifier, SearchModifier

public abstract class Modifier extends Building
  • 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

      public ModifierType type
    • timeSinceBuilt

      public float timeSinceBuilt
    • visuallyConnectedSides

      public boolean[] visuallyConnectedSides
    • moneySpentOn

      public int moneySpentOn
  • Method Details

    • write

      public void write(Kryo kryo, Output output)
      Specified by:
      write in interface KryoSerializable
      Overrides:
      write in class Building
    • read

      public void read(Kryo kryo, Input input)
      Specified by:
      read in interface KryoSerializable
      Overrides:
      read in class Building
    • getWalkCost

      public float getWalkCost()
      Specified by:
      getWalkCost in class Building
    • setSideConnected

      public void setSideConnected(Modifier.ConnectionSide side, boolean connected)
    • 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 class Building
    • fillModifierMenu

      public void fillModifierMenu(Group container, ObjectMap<String,Object> elements)
      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

      public void updateCustomButton(ComplexButton complexButton, boolean isPointing)
    • toJson

      public void toJson(Json json)
      Overrides:
      toJson in class Building
    • drawBatch

      public void drawBatch(Batch batch, float deltaTime, MapRenderingSystem.DrawMode drawMode)
    • drawBatchAdditive

      public void drawBatchAdditive(Batch batch, float deltaTime, MapRenderingSystem.DrawMode drawMode)
    • sameAs

      public boolean sameAs(Building otherBuilding)
      Overrides:
      sameAs in class Building
    • cloneBuilding

      public Modifier cloneBuilding()
      Specified by:
      cloneBuilding in class Building
    • update

      public void update(float deltaTime)
    • dispose

      public void dispose()
    • loadFromJson

      public void loadFromJson(JsonValue value)