Class PlatformTile

All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable

public final class PlatformTile extends Tile implements com.esotericsoftware.kryo.KryoSerializable
  • Field Details

    • bonusType

      public SpaceTileBonusType bonusType
    • bonusLevel

      public int bonusLevel
    • walkableEnabled

      public boolean walkableEnabled
    • building

      public Building building
  • Method Details

    • write

      public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output)
      Specified by:
      write in interface com.esotericsoftware.kryo.KryoSerializable
      Overrides:
      write in class Tile
    • read

      public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input)
      Specified by:
      read in interface com.esotericsoftware.kryo.KryoSerializable
      Overrides:
      read in class Tile
    • getData

      public void getData(com.badlogic.gdx.utils.IntArray data)
      Description copied from class: Tile
      Наполнить массив данными (по очереди, ключ (ItemDataType) - значение (int / enum.ordinal())
      Overrides:
      getData in class Tile
    • fillInventoryWithInfo

      public void fillInventoryWithInfo(com.badlogic.gdx.scenes.scene2d.ui.Table table, float width)
      Overrides:
      fillInventoryWithInfo in class Tile
    • generateSeedSalt

      public int generateSeedSalt()
      Description copied from class: Tile
      Используется для некого hashCode (при генерации seed карты), должен быть разным для каждого варианта тайла
      Overrides:
      generateSeedSalt in class Tile
    • setUnregistered

      public void setUnregistered()
      Overrides:
      setUnregistered in class Registrable
    • drawSelectedRange

      public void drawSelectedRange(com.badlogic.gdx.graphics.g2d.Batch batch, RangeCircle rangeCircle)
      Overrides:
      drawSelectedRange in class Tile
    • drawHoveredRange

      public void drawHoveredRange(com.badlogic.gdx.graphics.g2d.Batch batch, RangeCircle rangeCircle)
      Overrides:
      drawHoveredRange in class Tile
    • generateUiIcon

      public com.badlogic.gdx.scenes.scene2d.Group generateUiIcon(float tileSize)
      Description copied from class: Tile
      Сгенерировать stage2d Group для отображения тайла в UI
      Specified by:
      generateUiIcon in class Tile
    • getRarity

      public RarityType getRarity()
      Specified by:
      getRarity in class Tile
    • getWalkCost

      public float getWalkCost()
      Overrides:
      getWalkCost in class Tile
    • getInventorySubcategory

      public ItemSubcategoryType getInventorySubcategory()
      Description copied from class: Tile
      Вызывается через Item
      Specified by:
      getInventorySubcategory in class Tile
    • from

      public void from(Tile copyFrom)
      Overrides:
      from in class Tile
    • updateCache

      public void updateCache()
      Description copied from class: Tile
      Update any cached value that depends on other tiles / buildings / GVs
      Overrides:
      updateCache in class Tile
    • drawStatic

      public void drawStatic(com.badlogic.gdx.graphics.g2d.SpriteCache spriteCache, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode)
      Description copied from class: Tile
      Отрисовать статическую графику, которая не будет меняться с момента загрузки карты.
      Overrides:
      drawStatic in class Tile
    • getValue

      public float getValue()
      Overrides:
      getValue in class Tile
    • addSellItems

      public void addSellItems(com.badlogic.gdx.utils.Array<ItemStack> toStacks)
      Overrides:
      addSellItems in class Tile
    • getPrestigeScore

      public double getPrestigeScore()
      Specified by:
      getPrestigeScore in class Tile
      Returns:
      кол-во очков престижа за продажу. Если 0 или меньше, не будет продан. 1 score = 1 dust
    • canBeUpgraded

      public boolean canBeUpgraded()
      Overrides:
      canBeUpgraded in class Tile
    • createUpgradedTile

      public Tile createUpgradedTile()
      Overrides:
      createUpgradedTile in class Tile
    • getUpgradePriceInGreenPapers

      public int getUpgradePriceInGreenPapers()
      Overrides:
      getUpgradePriceInGreenPapers in class Tile
    • getUpgradePriceInAccelerators

      public int getUpgradePriceInAccelerators()
      Overrides:
      getUpgradePriceInAccelerators in class Tile
    • getUpgradePriceInResources

      public int getUpgradePriceInResources(ResourceType resourceType)
      Overrides:
      getUpgradePriceInResources in class Tile
    • getSortingScore

      public int getSortingScore(ItemSortingType sortingType)
      Specified by:
      getSortingScore in class Tile
    • isRoadType

      public boolean isRoadType()
      Specified by:
      isRoadType in class Tile
    • toJson

      public void toJson(com.badlogic.gdx.utils.Json json)
      Overrides:
      toJson in class Tile
    • drawBonusExtras

      public void drawBonusExtras(com.badlogic.gdx.graphics.g2d.SpriteCache spriteCache, float x, float y, float width, float height, boolean withShades, boolean withBonuses)
    • drawExtras

      public void drawExtras(com.badlogic.gdx.graphics.g2d.SpriteCache spriteCache, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode)
      Description copied from class: Tile
      Отрисовать графику, которая может измениться в течение игры
      Overrides:
      drawExtras in class Tile
    • sameAs

      public boolean sameAs(Tile otherTile)
      Overrides:
      sameAs in class Tile
      Returns:
      true, если характеристики двух тайлов одинаковы (без учета позиции)