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
FieldsFields inherited from class com.prineside.tdi2.Tile
boundingBox, center, enemyCount, highlightParticleA, highlightParticleB, type, visibleOnScreenFields inherited from class com.prineside.tdi2.Registrable
S -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSellItems(com.badlogic.gdx.utils.Array<ItemStack> toStacks) booleanvoiddrawBonusExtras(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height, boolean withShades, boolean withBonuses) voiddrawExtras(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) voiddrawHoveredRange(com.badlogic.gdx.graphics.g2d.Batch batch, RangeCircle rangeCircle) voiddrawSelectedRange(com.badlogic.gdx.graphics.g2d.Batch batch, RangeCircle rangeCircle) voiddrawStatic(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height, Map map, MapRenderingSystem.DrawMode drawMode) voidfillInventoryWithInfo(com.badlogic.gdx.scenes.scene2d.ui.Table table, float width) voidfillMapEditorMenu(com.badlogic.gdx.scenes.scene2d.ui.Table container, MapEditorItemInfoMenu menu) voidintИспользуется для некого hashCode (при генерации seed карты), должен быть разным для каждого варианта тайлаcom.badlogic.gdx.scenes.scene2d.GroupgenerateUiIcon(float tileSize) Сгенерировать stage2d Group для отображения тайла в UIvoidgetData(com.badlogic.gdx.utils.IntArray data) Наполнить массив данными (по очереди, ключ (ItemDataType) - значение (int / enum.ordinal())Вызывается через ItemdoubleintgetSortingScore(ItemSortingType sortingType) intintintgetUpgradePriceInResources(ResourceType resourceType) floatgetValue()floatgetWalkCost(boolean walkablePlatforms) booleanvoidread(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) Remove buildings from this tile so they are not stored in the inventorybooleanbooleansameAsWithExtras(Tile otherTile) sameAs() but also accounts for towers / modifiers on itvoidvoidtoJson(com.badlogic.gdx.utils.Json json) voidUpdate any cached value that depends on other tiles / buildings / GVsvoidwrite(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, getBoundingBox, getDescription, getTitle, getUserData, getX, getY, postDrawBatch, setPos, setUserData, toStringMethods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered
-
Field Details
-
bonusType
-
bonusLevel
public int bonusLevel -
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:
fillInventoryWithInfoin classTile
-
fillMapEditorMenu
public void fillMapEditorMenu(com.badlogic.gdx.scenes.scene2d.ui.Table container, MapEditorItemInfoMenu menu) - Overrides:
fillMapEditorMenuin classTile
-
generateSeedSalt
public int generateSeedSalt()Description copied from class:TileИспользуется для некого hashCode (при генерации seed карты), должен быть разным для каждого варианта тайла- Overrides:
generateSeedSaltin classTile
-
setUnregistered
public void setUnregistered()- Overrides:
setUnregisteredin classRegistrable
-
drawSelectedRange
- Overrides:
drawSelectedRangein classTile
-
drawHoveredRange
- Overrides:
drawHoveredRangein classTile
-
generateUiIcon
public com.badlogic.gdx.scenes.scene2d.Group generateUiIcon(float tileSize) Description copied from class:TileСгенерировать stage2d Group для отображения тайла в UI- Specified by:
generateUiIconin classTile
-
getRarity
-
getWalkCost
public float getWalkCost(boolean walkablePlatforms) - Overrides:
getWalkCostin classTile
-
getInventorySubcategory
Description copied from class:TileВызывается через Item- Specified by:
getInventorySubcategoryin classTile
-
from
-
updateCache
public void updateCache()Description copied from class:TileUpdate any cached value that depends on other tiles / buildings / GVs- Overrides:
updateCachein classTile
-
drawStatic
public void drawStatic(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height, Map map, MapRenderingSystem.DrawMode drawMode) - Overrides:
drawStaticin classTile
-
getValue
public float getValue() -
addSellItems
- Overrides:
addSellItemsin classTile
-
getPrestigeScore
public double getPrestigeScore()- Specified by:
getPrestigeScorein classTile- Returns:
- кол-во очков престижа за продажу. Если 0 или меньше, не будет продан. 1 score = 1 dust
-
canBeUpgraded
public boolean canBeUpgraded()- Overrides:
canBeUpgradedin classTile
-
createUpgradedTile
- Overrides:
createUpgradedTilein classTile
-
getUpgradePriceInGreenPapers
public int getUpgradePriceInGreenPapers()- Overrides:
getUpgradePriceInGreenPapersin classTile
-
getUpgradePriceInAccelerators
public int getUpgradePriceInAccelerators()- Overrides:
getUpgradePriceInAcceleratorsin classTile
-
getUpgradePriceInResources
- Overrides:
getUpgradePriceInResourcesin classTile
-
getSortingScore
- Specified by:
getSortingScorein classTile
-
isRoadType
public boolean isRoadType()- Specified by:
isRoadTypein classTile
-
toJson
public void toJson(com.badlogic.gdx.utils.Json json) -
drawBonusExtras
public void drawBonusExtras(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height, boolean withShades, boolean withBonuses) -
drawExtras
public void drawExtras(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) - Overrides:
drawExtrasin classTile
-
sameAs
-
removeExtrasForInventory
Description copied from class:TileRemove buildings from this tile so they are not stored in the inventory- Overrides:
removeExtrasForInventoryin classTile
-
sameAsWithExtras
Description copied from class:TilesameAs() but also accounts for towers / modifiers on it- Overrides:
sameAsWithExtrasin classTile
-