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:
com.esotericsoftware.kryo.KryoSerializable
-
Nested Class Summary
Nested classes/interfaces inherited from class com.prineside.tdi2.Tile
Tile.Factory<T extends Tile>, Tile.Pos
-
Field Summary
Fields inherited from class com.prineside.tdi2.Tile
boundingBox, center, enemyCount, highlightParticleA, highlightParticleB, type, visibleOnScreen
Fields inherited from class com.prineside.tdi2.Registrable
S
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSellItems
(com.badlogic.gdx.utils.Array<ItemStack> toStacks) boolean
void
drawExtras
(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) void
drawStatic
(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height, Map map, MapRenderingSystem.DrawMode drawMode) void
fillInventoryWithInfo
(com.badlogic.gdx.scenes.scene2d.ui.Table table, float width) void
fillItemCreationForm
(ItemCreationOverlay overlay) void
fillMapEditorMenu
(com.badlogic.gdx.scenes.scene2d.ui.Table container, MapEditorItemInfoMenu menu) void
int
Используется для некого hashCode (при генерации seed карты), должен быть разным для каждого варианта тайлаcom.badlogic.gdx.scenes.scene2d.Group
generateUiIcon
(float tileSize) Сгенерировать stage2d Group для отображения тайла в UIВызывается через Itemdouble
float
int
int
getSortingScore
(ItemSortingType sortingType) boolean
boolean
void
postDrawBatch
(com.badlogic.gdx.graphics.g2d.Batch batch, float deltaTime, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) void
read
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) 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
setResourceDensity
(float density) void
setResourcesCount
(ResourceType type, int count) void
void
toJson
(com.badlogic.gdx.utils.Json json) toString()
void
Update any cached value that depends on other tiles / buildings / GVsvoid
write
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) Methods 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, setUserData
Methods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered
-
Field Details
-
miner
-
minedResources
public int[] minedResources
-
-
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) -
setUnregistered
public void setUnregistered()- Overrides:
setUnregistered
in classRegistrable
-
fillMapEditorMenu
public void fillMapEditorMenu(com.badlogic.gdx.scenes.scene2d.ui.Table container, MapEditorItemInfoMenu menu) - Overrides:
fillMapEditorMenu
in classTile
-
fillInventoryWithInfo
public void fillInventoryWithInfo(com.badlogic.gdx.scenes.scene2d.ui.Table table, float width) - Overrides:
fillInventoryWithInfo
in classTile
-
generateSeedSalt
public int generateSeedSalt()Description copied from class:Tile
Используется для некого hashCode (при генерации seed карты), должен быть разным для каждого варианта тайла- Overrides:
generateSeedSalt
in 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:
getSortingScore
in classTile
-
isRoadType
public boolean isRoadType()- Specified by:
isRoadType
in classTile
-
getRarity
-
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
-
getResourceDensity
public float getResourceDensity() -
setResourceDensity
public void setResourceDensity(float density) -
getResourcesCount
-
setResourcesCount
-
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
-
toJson
public void toJson(com.badlogic.gdx.utils.Json json) -
sameAsWithExtras
Description copied from class:Tile
sameAs() but also accounts for towers / modifiers on it- Overrides:
sameAsWithExtras
in classTile
-
removeExtrasForInventory
Description copied from class:Tile
Remove buildings from this tile so they are not stored in the inventory- Overrides:
removeExtrasForInventory
in classTile
-
sameAs
-
drawStatic
public void drawStatic(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height, Map map, MapRenderingSystem.DrawMode drawMode) - Overrides:
drawStatic
in classTile
-
drawExtras
public void drawExtras(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) - Overrides:
drawExtras
in classTile
-
postDrawBatch
public void postDrawBatch(com.badlogic.gdx.graphics.g2d.Batch batch, float deltaTime, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) - Overrides:
postDrawBatch
in classTile
-
generateUiIcon
public com.badlogic.gdx.scenes.scene2d.Group generateUiIcon(float tileSize) Description copied from class:Tile
Сгенерировать stage2d Group для отображения тайла в UI- Specified by:
generateUiIcon
in classTile
-
toString
-