Package com.prineside.tdi2.tiles
Class SpawnTile
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.Tile
com.prineside.tdi2.tiles.SpawnTile
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
Nested classes/interfaces inherited from class com.prineside.tdi2.Tile
Tile.Factory<T extends Tile>, Tile.Pos
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
com.badlogic.gdx.utils.Array<com.badlogic.gdx.utils.Array<EnemyGroup.SpawnEnemyGroup>>
int
Fields inherited from class com.prineside.tdi2.Tile
boundingBox, center, enemyCount, highlightParticleA, highlightParticleB, map, type, visibleOnScreen, x, y
Fields inherited from class com.prineside.tdi2.Registrable
S
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllowedEnemy
(EnemyType enemyType, int firstWave, int lastWave) void
addSellItems
(com.badlogic.gdx.utils.Array<ItemStack> toStacks) boolean
void
drawBatch
(com.badlogic.gdx.graphics.g2d.Batch batch, float deltaTime, int x, int y) Перед отрисовкой врагов и прочего (сразу после отрисовки карты)void
fillInventoryWithInfo
(com.badlogic.gdx.scenes.scene2d.ui.Table table, float width) void
fillItemCreationForm
(ItemCreationOverlay overlay) void
fillMapEditorMenu
(com.badlogic.gdx.scenes.scene2d.Group container, MapEditorItemInfoMenu menu) void
int
Используется для некого hashCode (при генерации seed карты), должен быть разным для каждого варианта тайлаcom.badlogic.gdx.scenes.scene2d.Group
generateUiIcon
(float tileSize) Сгенерировать stage2d Group для отображения тайла в UIcom.badlogic.gdx.utils.Array<SpawnTile.AllowedEnemyConfig>
com.badlogic.gdx.utils.ObjectSet<EnemyType>
getEnemyConfig
(EnemyType enemyType) Вызывается через Itemdouble
int
getSortingScore
(ItemSortingType sortingType) float
getValue()
float
boolean
isEnemyAllowedOnWave
(EnemyType enemyType, int waveNumber) boolean
void
read
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) void
removeAllowedEnemy
(EnemyType enemyType) boolean
void
setAllowedEnemies
(com.badlogic.gdx.utils.Array<SpawnTile.AllowedEnemyConfig> allowedEnemies) void
void
toJson
(com.badlogic.gdx.utils.Json json) void
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, drawExtras, drawHoveredRange, drawRoadStatic, drawSelectedRange, drawStatic, getData, getDescription, getMap, getTitle, getUpgradePriceInAccelerators, getUpgradePriceInGreenPapers, getUpgradePriceInResources, getUserData, getX, getY, postDrawBatch, setMap, setPos, setUserData, toString, traverseNeighbourTiles, traverseNeighbourTilesAndThis, updateCache
Methods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered
-
Field Details
-
difficulty
public int difficulty -
enemySpawnQueuesFirstWave
public int enemySpawnQueuesFirstWave -
enemySpawnQueues
public com.badlogic.gdx.utils.Array<com.badlogic.gdx.utils.Array<EnemyGroup.SpawnEnemyGroup>> enemySpawnQueues
-
-
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) -
fillMapEditorMenu
public void fillMapEditorMenu(com.badlogic.gdx.scenes.scene2d.Group 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
-
addAllowedEnemy
-
removeAllowedEnemy
-
getEnemyConfig
- Returns:
- AllowedEnemyConfig или null
-
setAllowedEnemies
public void setAllowedEnemies(com.badlogic.gdx.utils.Array<SpawnTile.AllowedEnemyConfig> allowedEnemies) -
getAllowedEnemies
-
getAllowedEnemiesSet
-
isEnemyAllowedOnWave
-
getRarity
-
getWalkCost
public float getWalkCost()- Overrides:
getWalkCost
in classTile
-
getInventorySubcategory
Description copied from class:Tile
Вызывается через Item- Specified by:
getInventorySubcategory
in classTile
-
from
-
getValue
public float getValue() -
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
-
getSortingScore
- Specified by:
getSortingScore
in classTile
-
isRoadType
public boolean isRoadType()- Specified by:
isRoadType
in classTile
-
setUnregistered
public void setUnregistered()- Overrides:
setUnregistered
in classRegistrable
-
drawBatch
public void drawBatch(com.badlogic.gdx.graphics.g2d.Batch batch, float deltaTime, int x, int y) Description copied from class:Tile
Перед отрисовкой врагов и прочего (сразу после отрисовки карты) -
generateUiIcon
public com.badlogic.gdx.scenes.scene2d.Group generateUiIcon(float tileSize) Description copied from class:Tile
Сгенерировать stage2d Group для отображения тайла в UI- Specified by:
generateUiIcon
in classTile
-
toJson
public void toJson(com.badlogic.gdx.utils.Json json) -
sameAs
-