Package com.prineside.tdi2
Class Tile
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.Tile
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
- Direct Known Subclasses:
BossTile
,CoreTile
,DummyTile
,EqualizerTile
,GameValueTile
,PlatformTile
,QuadTile
,RoadTile
,ScriptTile
,SourceTile
,SpawnTile
,TargetTile
,XmMusicTrackTile
public abstract class Tile
extends Registrable
implements com.esotericsoftware.kryo.KryoSerializable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal IntRectangle
com.badlogic.gdx.math.Vector2
int
com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect
com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect
boolean
Fields inherited from class com.prineside.tdi2.Registrable
S
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSellItems
(com.badlogic.gdx.utils.Array<ItemStack> toStacks) boolean
boolean
boolean
boolean
void
drawBatch
(com.badlogic.gdx.graphics.g2d.Batch batch, float deltaTime, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) void
drawExtras
(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) void
drawHoveredRange
(com.badlogic.gdx.graphics.g2d.Batch batch, RangeCircle rangeCircle) void
drawRoadStatic
(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height, Map map) void
drawSelectedRange
(com.badlogic.gdx.graphics.g2d.Batch batch, RangeCircle rangeCircle) 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 container, float width) void
fillItemCreationForm
(ItemCreationOverlay overlay) void
fillMapEditorMenu
(com.badlogic.gdx.scenes.scene2d.ui.Table container, MapEditorItemInfoMenu menu) void
int
Используется для некого hashCode (при генерации seed карты), должен быть разным для каждого варианта тайлаabstract com.badlogic.gdx.scenes.scene2d.Group
generateUiIcon
(float tileSize) Сгенерировать stage2d Group для отображения тайла в UIcom.badlogic.gdx.math.Rectangle
void
getData
(com.badlogic.gdx.utils.IntArray data) Наполнить массив данными (по очереди, ключ (ItemDataType) - значение (int / enum.ordinal())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
(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
setPos
(int x, int y) void
setUserData
(String idx, Object data) 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.Registrable
isRegistered, setRegistered, setUnregistered
-
Field Details
-
type
-
highlightParticleA
public com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect highlightParticleA -
highlightParticleB
public com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect highlightParticleB -
enemyCount
public int enemyCount -
center
public com.badlogic.gdx.math.Vector2 center -
boundingBox
-
visibleOnScreen
public boolean visibleOnScreen
-
-
Constructor Details
-
Tile
-
-
Method Details
-
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) - Specified by:
write
in interfacecom.esotericsoftware.kryo.KryoSerializable
- Overrides:
write
in classRegistrable
-
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
read
in interfacecom.esotericsoftware.kryo.KryoSerializable
- Overrides:
read
in classRegistrable
-
getTitle
-
getDescription
-
canBeSelected
public boolean canBeSelected() -
affectedByLuckyWheelMultiplier
public boolean affectedByLuckyWheelMultiplier() -
getUserData
-
setUserData
-
getData
public void getData(com.badlogic.gdx.utils.IntArray data) Наполнить массив данными (по очереди, ключ (ItemDataType) - значение (int / enum.ordinal()) -
getRarity
-
from
-
fillMapEditorMenu
public void fillMapEditorMenu(com.badlogic.gdx.scenes.scene2d.ui.Table container, MapEditorItemInfoMenu menu) -
fillInventoryWithInfo
public void fillInventoryWithInfo(com.badlogic.gdx.scenes.scene2d.ui.Table container, float width) -
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(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height, Map map, MapRenderingSystem.DrawMode drawMode) -
drawRoadStatic
public void drawRoadStatic(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height, Map map) -
drawExtras
public void drawExtras(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) -
drawBatch
public void drawBatch(com.badlogic.gdx.graphics.g2d.Batch batch, float deltaTime, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) -
postDrawBatch
public void postDrawBatch(com.badlogic.gdx.graphics.g2d.Batch batch, float deltaTime, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) -
getBoundingBox
public com.badlogic.gdx.math.Rectangle getBoundingBox() -
generateUiIcon
public abstract com.badlogic.gdx.scenes.scene2d.Group generateUiIcon(float tileSize) Сгенерировать 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
public void toJson(com.badlogic.gdx.utils.Json json) -
toString
-