Package com.prineside.tdi2.tiles
Class SourceTile
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.Tile
com.prineside.tdi2.tiles.SourceTile
- 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, type, visibleOnScreenFields inherited from class com.prineside.tdi2.Registrable
S -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSellItems(Array<ItemStack> toStacks) booleanvoiddrawExtras(Batch batch, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) voiddrawStatic(Batch batch, float x, float y, float width, float height, Map map, MapRenderingSystem.DrawMode drawMode) voidfillInventoryWithInfo(Table table, float width) voidfillItemCreationForm(ItemCreationOverlay overlay) voidfillMapEditorMenu(Table container, MapEditorItemInfoMenu menu) voidintИспользуется для некого hashCode (при генерации seed карты), должен быть разным для каждого варианта тайлаgenerateUiIcon(float tileSize) Сгенерировать stage2d Group для отображения тайла в UIВызывается через ItemdoublefloatintintgetSortingScore(ItemSortingType sortingType) booleanbooleanvoidpostDrawBatch(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 itvoidsetResourceDensity(float density) voidsetResourcesCount(ResourceType type, int count) voidvoidtoString()voidUpdate any cached value that depends on other tiles / buildings / GVsvoidMethods inherited from class com.prineside.tdi2.Tile
affectedByLuckyWheelMultiplier, canBeSelected, canBeSold, cloneTile, createUpgradedTile, drawBatch, drawHoveredRange, drawRoadStatic, drawSelectedRange, getBoundingBox, getData, getDescription, getTitle, getUpgradePriceInAccelerators, getUpgradePriceInGreenPapers, getUpgradePriceInResources, getUserData, getValue, getWalkCost, getX, getY, setPos, setUserDataMethods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered
-
Field Details
-
miner
-
minedResources
public int[] minedResources
-
-
Method Details
-
write
- Specified by:
writein interfaceKryoSerializable- Overrides:
writein classTile
-
read
- Specified by:
readin interfaceKryoSerializable- Overrides:
readin classTile
-
setUnregistered
public void setUnregistered()- Overrides:
setUnregisteredin classRegistrable
-
fillMapEditorMenu
- Overrides:
fillMapEditorMenuin classTile
-
fillInventoryWithInfo
- Overrides:
fillInventoryWithInfoin classTile
-
generateSeedSalt
public int generateSeedSalt()Description copied from class:TileИспользуется для некого hashCode (при генерации seed карты), должен быть разным для каждого варианта тайла- Overrides:
generateSeedSaltin classTile
-
isDepleted
public boolean isDepleted()- Returns:
- true if all of the tile's resources were mined out Note: only works if used in game on custom maps. In any other case it won't be depleted
-
getSortingScore
- Specified by:
getSortingScorein classTile
-
isRoadType
public boolean isRoadType()- Specified by:
isRoadTypein classTile
-
getRarity
-
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
-
getResourceDensity
public float getResourceDensity() -
setResourceDensity
public void setResourceDensity(float density) -
getResourcesCount
-
setResourcesCount
-
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
-
toJson
-
sameAsWithExtras
Description copied from class:TilesameAs() but also accounts for towers / modifiers on it- Overrides:
sameAsWithExtrasin classTile
-
removeExtrasForInventory
Description copied from class:TileRemove buildings from this tile so they are not stored in the inventory- Overrides:
removeExtrasForInventoryin classTile
-
sameAs
-
drawStatic
public void drawStatic(Batch batch, float x, float y, float width, float height, Map map, MapRenderingSystem.DrawMode drawMode) - Overrides:
drawStaticin classTile
-
drawExtras
public void drawExtras(Batch batch, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) - Overrides:
drawExtrasin classTile
-
postDrawBatch
public void postDrawBatch(Batch batch, float deltaTime, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) - Overrides:
postDrawBatchin classTile
-
generateUiIcon
Description copied from class:TileСгенерировать stage2d Group для отображения тайла в UI- Specified by:
generateUiIconin classTile
-
toString
-