Package com.prineside.tdi2.tiles
Class PlatformTile
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.Tile
com.prineside.tdi2.tiles.PlatformTile
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.prineside.tdi2.Tile
Tile.Factory<T extends Tile>, Tile.Pos
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
boolean
Fields inherited from class com.prineside.tdi2.Tile
boundingBox, center, enemyCount, highlightParticleA, highlightParticleB, map, type, visibleOnScreen, x, y
Fields inherited from class com.prineside.tdi2.Registrable
S
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSellItems
(com.badlogic.gdx.utils.Array<ItemStack> toStacks) boolean
void
drawBonusExtras
(com.badlogic.gdx.graphics.g2d.SpriteCache spriteCache, float x, float y, float width, float height, boolean withShades, boolean withBonuses) void
drawExtras
(com.badlogic.gdx.graphics.g2d.SpriteCache spriteCache, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) Отрисовать графику, которая может измениться в течение игрыvoid
drawHoveredRange
(com.badlogic.gdx.graphics.g2d.Batch batch, RangeCircle rangeCircle) void
drawSelectedRange
(com.badlogic.gdx.graphics.g2d.Batch batch, RangeCircle rangeCircle) void
drawStatic
(com.badlogic.gdx.graphics.g2d.SpriteCache spriteCache, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) Отрисовать статическую графику, которая не будет меняться с момента загрузки карты.void
fillInventoryWithInfo
(com.badlogic.gdx.scenes.scene2d.ui.Table table, float width) void
int
Используется для некого hashCode (при генерации seed карты), должен быть разным для каждого варианта тайлаcom.badlogic.gdx.scenes.scene2d.Group
generateUiIcon
(float tileSize) Сгенерировать stage2d Group для отображения тайла в UIvoid
getData
(com.badlogic.gdx.utils.IntArray data) Наполнить массив данными (по очереди, ключ (ItemDataType) - значение (int / enum.ordinal())Вызывается через Itemdouble
int
getSortingScore
(ItemSortingType sortingType) int
int
int
getUpgradePriceInResources
(ResourceType resourceType) float
getValue()
float
boolean
void
read
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) boolean
void
void
toJson
(com.badlogic.gdx.utils.Json json) void
Update any cached value that depends on other tiles / buildings / GVsvoid
write
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) Methods inherited from class com.prineside.tdi2.Tile
affectedByLuckyWheelMultiplier, canBeSelected, canBeSold, cloneTile, drawBatch, drawRoadStatic, fillItemCreationForm, fillMapEditorMenu, getDescription, getMap, getTitle, getUserData, getX, getY, postDrawBatch, setMap, setPos, setUserData, toString, traverseNeighbourTiles, traverseNeighbourTilesAndThis
Methods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered
-
Field Details
-
bonusType
-
bonusLevel
public int bonusLevel -
walkableEnabled
public boolean walkableEnabled -
building
-
-
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) -
getData
public void getData(com.badlogic.gdx.utils.IntArray data) Description copied from class:Tile
Наполнить массив данными (по очереди, ключ (ItemDataType) - значение (int / enum.ordinal()) -
fillInventoryWithInfo
public void fillInventoryWithInfo(com.badlogic.gdx.scenes.scene2d.ui.Table table, float width) - Overrides:
fillInventoryWithInfo
in classTile
-
generateSeedSalt
public int generateSeedSalt()Description copied from class:Tile
Используется для некого hashCode (при генерации seed карты), должен быть разным для каждого варианта тайла- Overrides:
generateSeedSalt
in classTile
-
setUnregistered
public void setUnregistered()- Overrides:
setUnregistered
in classRegistrable
-
drawSelectedRange
- Overrides:
drawSelectedRange
in classTile
-
drawHoveredRange
- Overrides:
drawHoveredRange
in classTile
-
generateUiIcon
public com.badlogic.gdx.scenes.scene2d.Group generateUiIcon(float tileSize) Description copied from class:Tile
Сгенерировать stage2d Group для отображения тайла в UI- Specified by:
generateUiIcon
in classTile
-
getRarity
-
getWalkCost
public float getWalkCost()- Overrides:
getWalkCost
in classTile
-
getInventorySubcategory
Description copied from class:Tile
Вызывается через Item- Specified by:
getInventorySubcategory
in classTile
-
from
-
updateCache
public void updateCache()Description copied from class:Tile
Update any cached value that depends on other tiles / buildings / GVs- Overrides:
updateCache
in classTile
-
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 classTile
-
getValue
public float getValue() -
addSellItems
- Overrides:
addSellItems
in classTile
-
getPrestigeScore
public double getPrestigeScore()- Specified by:
getPrestigeScore
in classTile
- Returns:
- кол-во очков престижа за продажу. Если 0 или меньше, не будет продан. 1 score = 1 dust
-
canBeUpgraded
public boolean canBeUpgraded()- Overrides:
canBeUpgraded
in classTile
-
createUpgradedTile
- Overrides:
createUpgradedTile
in classTile
-
getUpgradePriceInGreenPapers
public int getUpgradePriceInGreenPapers()- Overrides:
getUpgradePriceInGreenPapers
in classTile
-
getUpgradePriceInAccelerators
public int getUpgradePriceInAccelerators()- Overrides:
getUpgradePriceInAccelerators
in classTile
-
getUpgradePriceInResources
- Overrides:
getUpgradePriceInResources
in classTile
-
getSortingScore
- Specified by:
getSortingScore
in classTile
-
isRoadType
public boolean isRoadType()- Specified by:
isRoadType
in classTile
-
toJson
public void toJson(com.badlogic.gdx.utils.Json json) -
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 classTile
-
sameAs
-