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 TypeMethodDescriptionvoid
addSellItems
(Array<ItemStack> toStacks) boolean
boolean
boolean
boolean
void
drawBatch
(Batch batch, float deltaTime, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) void
drawExtras
(Batch batch, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) void
drawHoveredRange
(Batch batch, RangeCircle rangeCircle) void
drawRoadStatic
(Batch batch, float x, float y, float width, float height, Map map) 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 container, float width) void
fillItemCreationForm
(ItemCreationOverlay overlay) void
fillMapEditorMenu
(Table container, MapEditorItemInfoMenu menu) void
int
Используется для некого hashCode (при генерации seed карты), должен быть разным для каждого варианта тайлаabstract Group
generateUiIcon
(float tileSize) Сгенерировать stage2d Group для отображения тайла в UIvoid
Fill array with item data, key = ItemDataType, value = int / enum.ordinal() Called by TileItem#getData()abstract ItemSubcategoryType
Вызывается через Itemabstract double
abstract RarityType
abstract int
getSortingScore
(ItemSortingType sortingType) getTitle()
int
int
int
getUpgradePriceInResources
(ResourceType resourceType) getUserData
(String key) float
getValue()
float
getWalkCost
(boolean walkablePlatforms) int
getX()
int
getY()
abstract boolean
void
postDrawBatch
(Batch batch, float deltaTime, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) 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
setPos
(int x, int y) void
setUserData
(String idx, Object data) void
toString()
void
Update any cached value that depends on other tiles / buildings / GVsvoid
Methods 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:
write
in interfaceKryoSerializable
- Overrides:
write
in classRegistrable
-
read
- Specified by:
read
in interfaceKryoSerializable
- Overrides:
read
in 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
-