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 TypeFieldDescriptionintbooleanFields inherited from class com.prineside.tdi2.Tile
boundingBox, center, enemyCount, highlightParticleA, highlightParticleB, type, userData, 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.SpriteCache spriteCache, float x, float y, float width, float height, boolean withShades, boolean withBonuses) voiddrawExtras(com.badlogic.gdx.graphics.g2d.SpriteCache spriteCache, 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.SpriteCache spriteCache, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) Отрисовать статическую графику, которая не будет меняться с момента загрузки карты.voidfillInventoryWithInfo(com.badlogic.gdx.scenes.scene2d.ui.Table table, float width) 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()floatbooleanvoidread(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) booleanvoidvoidtoJson(com.badlogic.gdx.utils.Json json) voidwrite(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, getQuality, getTitle, getUserData, getX, getY, postDrawBatch, setMap, setPos, setUserData, toString, traverseNeighbourTiles, traverseNeighbourTilesAndThisMethods 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:
fillInventoryWithInfoin 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()- Overrides:
getWalkCostin classTile
-
getInventorySubcategory
Description copied from class:TileВызывается через Item- Specified by:
getInventorySubcategoryin classTile
-
from
-
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:
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.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:
drawExtrasin classTile
-
sameAs
-