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:
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, towerDisablingEnemyCount, type, visibleOnScreen
Fields inherited from class com.prineside.tdi2.Registrable
S
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSellItems
(Array<ItemStack> toStacks) boolean
void
drawBonusExtras
(Batch batch, float x, float y, float width, float height, boolean withShades, boolean withBonuses) void
drawExtras
(Batch batch, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) void
drawHoveredRange
(Batch batch, RangeCircle rangeCircle) void
drawSelectedRange
(Batch batch, RangeCircle rangeCircle) void
drawStatic
(Batch batch, float x, float y, float width, float height, Map map, MapRenderingSystem.DrawMode drawMode) void
fillInventoryWithInfo
(Table table, float width) void
fillMapEditorMenu
(Table container, MapEditorItemInfoMenu menu) void
int
Используется для некого hashCode (при генерации seed карты), должен быть разным для каждого варианта тайлаgenerateUiIcon
(float tileSize) Сгенерировать stage2d Group для отображения тайла в UIvoid
Fill array with item data, key = ItemDataType, value = int / enum.ordinal() Called by TileItem#getData()Вызывается через Itemdouble
int
getSortingScore
(ItemSortingType sortingType) int
int
int
getUpgradePriceInResources
(ResourceType resourceType) float
getValue()
float
getWalkCost
(boolean walkablePlatforms) boolean
void
Remove buildings from this tile so they are not stored in the inventoryboolean
boolean
sameAsWithExtras
(Tile otherTile) sameAs() but also accounts for towers / modifiers on itvoid
Remove the reference to the game state and mark this object as not registered.void
void
Update any cached value that depends on other tiles / buildings / GVsvoid
Methods inherited from class com.prineside.tdi2.Tile
affectedByLuckyWheelMultiplier, canBeSelected, canBeSold, cloneTile, drawBatch, drawRoadStatic, fillItemCreationForm, getBoundingBox, getDescription, getTitle, getUserData, getX, getY, postDrawBatch, setPos, setUserData, toString
Methods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered
-
Field Details
-
bonusType
-
bonusLevel
public int bonusLevel -
building
-
-
Method Details
-
write
- Specified by:
write
in interfaceKryoSerializable
- Overrides:
write
in classTile
-
read
- Specified by:
read
in interfaceKryoSerializable
- Overrides:
read
in classTile
-
getData
Description copied from class:Tile
Fill array with item data, key = ItemDataType, value = int / enum.ordinal() Called by TileItem#getData() -
fillInventoryWithInfo
- Overrides:
fillInventoryWithInfo
in classTile
-
fillMapEditorMenu
- Overrides:
fillMapEditorMenu
in classTile
-
generateSeedSalt
public int generateSeedSalt()Description copied from class:Tile
Используется для некого hashCode (при генерации seed карты), должен быть разным для каждого варианта тайла- Overrides:
generateSeedSalt
in classTile
-
setUnregistered
public void setUnregistered()Description copied from class:Registrable
Remove the reference to the game state and mark this object as not registered.- Overrides:
setUnregistered
in classRegistrable
-
drawSelectedRange
- Overrides:
drawSelectedRange
in classTile
-
drawHoveredRange
- Overrides:
drawHoveredRange
in classTile
-
generateUiIcon
Description copied from class:Tile
Сгенерировать stage2d Group для отображения тайла в UI- Specified by:
generateUiIcon
in classTile
-
getRarity
-
getWalkCost
public float getWalkCost(boolean walkablePlatforms) - 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(Batch batch, float x, float y, float width, float height, Map map, MapRenderingSystem.DrawMode drawMode) - 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
-
drawBonusExtras
public void drawBonusExtras(Batch batch, float x, float y, float width, float height, boolean withShades, boolean withBonuses) -
drawExtras
public void drawExtras(Batch batch, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) - Overrides:
drawExtras
in classTile
-
sameAs
-
removeExtrasForInventory
Description copied from class:Tile
Remove buildings from this tile so they are not stored in the inventory- Overrides:
removeExtrasForInventory
in classTile
-
sameAsWithExtras
Description copied from class:Tile
sameAs() but also accounts for towers / modifiers on it- Overrides:
sameAsWithExtras
in classTile
-