Package com.prineside.tdi2
Class Tile
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.Tile
- All Implemented Interfaces:
KryoSerializable
- Direct Known Subclasses:
BossTile,CoreTile,DummyTile,EqualizerTile,GameValueTile,PlatformTile,QuadTile,RoadTile,ScriptTile,SourceTile,SpawnTile,TargetTile,XmMusicTrackTile
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class com.prineside.tdi2.Registrable
S -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSellItems(Array<ItemStack> toStacks) booleanbooleanbooleanbooleanvoiddrawBatch(Batch batch, float deltaTime, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) voiddrawExtras(Batch batch, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) voiddrawHoveredRange(Batch batch, RangeCircle rangeCircle) voiddrawRoadStatic(Batch batch, float x, float y, float width, float height, Map map) voiddrawSelectedRange(Batch batch, RangeCircle rangeCircle) voiddrawStatic(Batch batch, float x, float y, float width, float height, Map map, MapRenderingSystem.DrawMode drawMode) voidfillInventoryWithInfo(Table container, float width) voidfillItemCreationForm(ItemCreationOverlay overlay) voidfillMapEditorMenu(Table container, MapEditorItemInfoMenu menu) voidintИспользуется для некого hashCode (при генерации seed карты), должен быть разным для каждого варианта тайлаabstract GroupgenerateUiIcon(float tileSize) Сгенерировать stage2d Group для отображения тайла в UIvoidFill array with item data, key = ItemDataType, value = int / enum.ordinal() Called by TileItem#getData()abstract ItemSubcategoryTypeВызывается через Itemabstract doubleabstract RarityTypeabstract intgetSortingScore(ItemSortingType sortingType) getTitle()intintintgetUpgradePriceInResources(ResourceType resourceType) getUserData(String key) floatgetValue()floatgetWalkCost(boolean walkablePlatforms) intgetX()intgetY()abstract booleanvoidpostDrawBatch(Batch batch, float deltaTime, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) voidRemove buildings from this tile so they are not stored in the inventorybooleanbooleansameAsWithExtras(Tile otherTile) sameAs() but also accounts for towers / modifiers on itvoidsetPos(int x, int y) voidsetUserData(String idx, Object data) voidtoString()voidUpdate any cached value that depends on other tiles / buildings / GVsvoidMethods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered
-
Field Details
-
type
-
highlightParticleA
-
highlightParticleB
-
enemyCount
public int enemyCount -
center
-
boundingBox
-
visibleOnScreen
public boolean visibleOnScreen
-
-
Constructor Details
-
Tile
-
-
Method Details
-
write
- Specified by:
writein interfaceKryoSerializable- Overrides:
writein classRegistrable
-
read
- Specified by:
readin interfaceKryoSerializable- Overrides:
readin classRegistrable
-
getTitle
-
getDescription
-
canBeSelected
public boolean canBeSelected() -
affectedByLuckyWheelMultiplier
public boolean affectedByLuckyWheelMultiplier() -
getUserData
-
setUserData
-
getData
Fill array with item data, key = ItemDataType, value = int / enum.ordinal() Called by TileItem#getData() -
getRarity
-
from
-
fillMapEditorMenu
-
fillInventoryWithInfo
-
getWalkCost
public float getWalkCost(boolean walkablePlatforms) -
drawSelectedRange
-
drawHoveredRange
-
getInventorySubcategory
Вызывается через Item -
updateCache
public void updateCache()Update any cached value that depends on other tiles / buildings / GVs -
cloneTile
-
setPos
public void setPos(int x, int y) -
getX
public int getX() -
getY
public int getY() -
generateSeedSalt
public int generateSeedSalt()Используется для некого hashCode (при генерации seed карты), должен быть разным для каждого варианта тайла -
getSortingScore
-
isRoadType
public abstract boolean isRoadType() -
drawStatic
public void drawStatic(Batch batch, float x, float y, float width, float height, Map map, MapRenderingSystem.DrawMode drawMode) -
drawRoadStatic
-
drawExtras
public void drawExtras(Batch batch, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) -
drawBatch
public void drawBatch(Batch batch, float deltaTime, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) -
postDrawBatch
public void postDrawBatch(Batch batch, float deltaTime, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) -
getBoundingBox
-
generateUiIcon
Сгенерировать stage2d Group для отображения тайла в UI -
sameAs
- Returns:
- true, если характеристики двух тайлов одинаковы (без учета позиции)
-
sameAsWithExtras
sameAs() but also accounts for towers / modifiers on it -
removeExtrasForInventory
Remove buildings from this tile so they are not stored in the inventory -
getValue
public float getValue() -
addSellItems
-
getPrestigeScore
public abstract double getPrestigeScore()- Returns:
- кол-во очков престижа за продажу. Если 0 или меньше, не будет продан. 1 score = 1 dust
-
canBeSold
public boolean canBeSold() -
canBeUpgraded
public boolean canBeUpgraded() -
createUpgradedTile
-
getUpgradePriceInGreenPapers
public int getUpgradePriceInGreenPapers() -
getUpgradePriceInAccelerators
public int getUpgradePriceInAccelerators() -
getUpgradePriceInResources
-
toJson
-
toString
-