Class Tile

All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
Direct Known Subclasses:
BossTile, CoreTile, DummyTile, EqualizerTile, GameValueTile, PlatformTile, QuadTile, RoadTile, ScriptTile, SourceTile, SpawnTile, TargetTile, XmMusicTrackTile

public abstract class Tile extends Registrable implements com.esotericsoftware.kryo.KryoSerializable
  • Field Details

    • type

      public TileType type
    • highlightParticleA

      public com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect highlightParticleA
    • highlightParticleB

      public com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect highlightParticleB
    • enemyCount

      public int enemyCount
    • center

      public com.badlogic.gdx.math.Vector2 center
    • boundingBox

      public final IntRectangle boundingBox
    • visibleOnScreen

      public boolean visibleOnScreen
  • Constructor Details

  • 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 Registrable
    • 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 Registrable
    • getTitle

      public CharSequence getTitle()
    • getDescription

      public CharSequence getDescription()
    • canBeSelected

      public boolean canBeSelected()
    • affectedByLuckyWheelMultiplier

      public boolean affectedByLuckyWheelMultiplier()
    • getUserData

      @Null public Object getUserData(String key)
    • setUserData

      public void setUserData(String idx, @Null Object data)
    • getData

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

      public abstract RarityType getRarity()
    • from

      public void from(Tile copyFrom)
    • fillMapEditorMenu

      public void fillMapEditorMenu(com.badlogic.gdx.scenes.scene2d.ui.Table container, MapEditorItemInfoMenu menu)
    • fillInventoryWithInfo

      public void fillInventoryWithInfo(com.badlogic.gdx.scenes.scene2d.ui.Table container, float width)
    • getWalkCost

      public float getWalkCost(boolean walkablePlatforms)
    • drawSelectedRange

      public void drawSelectedRange(com.badlogic.gdx.graphics.g2d.Batch batch, RangeCircle rangeCircle)
    • drawHoveredRange

      public void drawHoveredRange(com.badlogic.gdx.graphics.g2d.Batch batch, RangeCircle rangeCircle)
    • getInventorySubcategory

      public abstract ItemSubcategoryType getInventorySubcategory()
      Вызывается через Item
    • updateCache

      public void updateCache()
      Update any cached value that depends on other tiles / buildings / GVs
    • cloneTile

      public Tile cloneTile()
    • setPos

      public void setPos(int x, int y)
    • getX

      public int getX()
    • getY

      public int getY()
    • generateSeedSalt

      public int generateSeedSalt()
      Используется для некого hashCode (при генерации seed карты), должен быть разным для каждого варианта тайла
    • getSortingScore

      public abstract int getSortingScore(ItemSortingType sortingType)
    • isRoadType

      public abstract boolean isRoadType()
    • drawStatic

      public void drawStatic(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height, Map map, MapRenderingSystem.DrawMode drawMode)
    • drawRoadStatic

      public void drawRoadStatic(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height, Map map)
    • drawExtras

      public void drawExtras(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode)
    • drawBatch

      public void drawBatch(com.badlogic.gdx.graphics.g2d.Batch batch, float deltaTime, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode)
    • postDrawBatch

      public void postDrawBatch(com.badlogic.gdx.graphics.g2d.Batch batch, float deltaTime, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode)
    • getBoundingBox

      public com.badlogic.gdx.math.Rectangle getBoundingBox()
    • generateUiIcon

      public abstract com.badlogic.gdx.scenes.scene2d.Group generateUiIcon(float tileSize)
      Сгенерировать stage2d Group для отображения тайла в UI
    • sameAs

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

      public boolean sameAsWithExtras(Tile otherTile)
      sameAs() but also accounts for towers / modifiers on it
    • removeExtrasForInventory

      public Tile removeExtrasForInventory()
      Remove buildings from this tile so they are not stored in the inventory
    • getValue

      public float getValue()
    • addSellItems

      public void addSellItems(com.badlogic.gdx.utils.Array<ItemStack> toStacks)
    • getPrestigeScore

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

      public boolean canBeSold()
    • canBeUpgraded

      public boolean canBeUpgraded()
    • createUpgradedTile

      public Tile createUpgradedTile()
    • getUpgradePriceInGreenPapers

      public int getUpgradePriceInGreenPapers()
    • getUpgradePriceInAccelerators

      public int getUpgradePriceInAccelerators()
    • getUpgradePriceInResources

      public int getUpgradePriceInResources(ResourceType resourceType)
    • fillItemCreationForm

      public void fillItemCreationForm(ItemCreationOverlay overlay)
    • toJson

      public void toJson(com.badlogic.gdx.utils.Json json)
    • toString

      public String toString()
      Overrides:
      toString in class Object