Package com.prineside.tdi2.tiles
Class CoreTile
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.Tile
com.prineside.tdi2.tiles.CoreTile
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static enum
static enum
static class
Nested classes/interfaces inherited from class com.prineside.tdi2.Tile
Tile.Factory<T extends Tile>, Tile.Pos
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected float
float
protected float
static final int
protected int
static final int[]
static final int[]
static final int[]
static final int
protected float
static final int[]
static final int[]
float
com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect
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
addSellItems
(com.badlogic.gdx.utils.Array<ItemStack> toStacks) boolean
canUpgradeBeInstalled
(int col, int row) Использует поля для system (Upgrade.installed), вызывать только во время игрыvoid
drawBatch
(com.badlogic.gdx.graphics.g2d.Batch batch, float deltaTime, int x, int y) Перед отрисовкой врагов и прочего (сразу после отрисовки карты)void
drawStatic
(com.badlogic.gdx.graphics.g2d.SpriteCache spriteCache, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) Отрисовать статическую графику, которая не будет меняться с момента загрузки карты.void
fillItemCreationForm
(ItemCreationOverlay overlay) void
int
Используется для некого hashCode (при генерации seed карты), должен быть разным для каждого варианта тайлаcom.badlogic.gdx.scenes.scene2d.Group
generateUiIcon
(float tileSize) Сгенерировать stage2d Group для отображения тайла в UIcom.badlogic.gdx.graphics.Color[]
float
void
getData
(com.badlogic.gdx.utils.IntArray data) Наполнить массив данными (по очереди, ключ (ItemDataType) - значение (int / enum.ordinal())float
float
int
getIcon()
Вызывается через Itemint
getLevel()
getName()
float
double
int
getSortingScore
(ItemSortingType sortingType) com.badlogic.gdx.graphics.Color
getTier()
getTitle()
getUpgrade
(int col, int row) int
static int
getUpgradeIdx
(CoreTile.Tier tier, int col, int row) int
getUpgradeInstallLevel
(int idx) int
getUpgradeInstallLevel
(int col, int row) int
com.badlogic.gdx.utils.Array<CoreTile.Upgrade>
boolean
boolean
boolean
isValidUpgradePos
(int col, int row) boolean
void
read
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) boolean
void
setExperience
(float exp) Установка опыта напрямуюvoid
setExperienceGeneration
(float val) void
void
void
setRegistered
(GameSystemProvider systemProvider) void
setTier
(CoreTile.Tier tier) void
setUpgrade
(int col, int row, CoreTile.Upgrade upgrade) void
setUpgradeInstallLevel
(int col, int row, int level) void
setXpLevelRequirementFixed
(boolean isFixed) 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, canBeUpgraded, cloneTile, createUpgradedTile, drawExtras, drawHoveredRange, drawRoadStatic, drawSelectedRange, fillInventoryWithInfo, fillMapEditorMenu, getMap, getUpgradePriceInAccelerators, getUpgradePriceInGreenPapers, getUpgradePriceInResources, getUserData, getValue, getWalkCost, getX, getY, postDrawBatch, setMap, setPos, setUserData, toString, traverseNeighbourTiles, traverseNeighbourTilesAndThis, updateCache
Methods inherited from class com.prineside.tdi2.Registrable
isRegistered, setUnregistered
-
Field Details
-
MAX_LEVEL
public static final int MAX_LEVEL- See Also:
-
FIXED_LEVEL_XP_REQUIREMENT
public static final int FIXED_LEVEL_XP_REQUIREMENT- See Also:
-
LEVEL_EXPERIENCE
public static final int[] LEVEL_EXPERIENCE -
LEVEL_EXPERIENCE_MILESTONES
public static final int[] LEVEL_EXPERIENCE_MILESTONES -
TIER_COLS
public static final int[] TIER_COLS -
TIER_ROWS
public static final int[] TIER_ROWS -
LINK_DIRECTION_BITS
public static final int[] LINK_DIRECTION_BITS -
predefinedType
-
timeDrawn
public float timeDrawn -
upgradeAvailableParticleEffect
public com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect upgradeAvailableParticleEffect -
doubleSpeedTimeLeft
public float doubleSpeedTimeLeft -
level
protected int level -
experience
protected float experience -
nextLevelExperience
protected float nextLevelExperience -
currentLevelExperience
protected float currentLevelExperience
-
-
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) -
getData
public void getData(com.badlogic.gdx.utils.IntArray data) Description copied from class:Tile
Наполнить массив данными (по очереди, ключ (ItemDataType) - значение (int / enum.ordinal()) -
setRegistered
- Overrides:
setRegistered
in classRegistrable
-
getExperienceGeneration
public float getExperienceGeneration()- Returns:
- raw value of the tile, not affected by GVP
- See Also:
-
setExperienceGeneration
public void setExperienceGeneration(float val) -
isXpLevelRequirementFixed
public boolean isXpLevelRequirementFixed() -
setXpLevelRequirementFixed
public void setXpLevelRequirementFixed(boolean isFixed) -
getName
-
getTier
-
setTier
-
addSellItems
- Overrides:
addSellItems
in classTile
-
getPrestigeScore
public double getPrestigeScore()- Specified by:
getPrestigeScore
in classTile
- Returns:
- кол-во очков престижа за продажу. Если 0 или меньше, не будет продан. 1 score = 1 dust
-
getUpgrades
-
getTitle
-
setName
-
getIcon
-
setIcon
-
getDescription
- Overrides:
getDescription
in classTile
-
getRarity
-
getUpgradeCols
public int getUpgradeCols() -
getUpgradeRows
public int getUpgradeRows() -
isValidUpgradePos
public boolean isValidUpgradePos(int col, int row) -
getExperience
public float getExperience() -
getLevel
public int getLevel() -
getNextLevelExperience
public float getNextLevelExperience() -
getCurrentLevelExperience
public float getCurrentLevelExperience() -
getUpgradeInstallLevel
public int getUpgradeInstallLevel(int idx) -
getUpgradeInstallLevel
public int getUpgradeInstallLevel(int col, int row) -
setUpgradeInstallLevel
public void setUpgradeInstallLevel(int col, int row, int level) -
hasSomethingToUpgrade
public boolean hasSomethingToUpgrade() -
getFreeUpgradePoints
public int getFreeUpgradePoints() -
setExperience
public void setExperience(float exp) Установка опыта напрямую- Parameters:
exp
- кол-во опыта, которое будет установлено точно таким же
-
getUpgradeIdx
-
getUpgrade
-
canUpgradeBeInstalled
public boolean canUpgradeBeInstalled(int col, int row) Использует поля для system (Upgrade.installed), вызывать только во время игры -
setUpgrade
-
generateSeedSalt
public int generateSeedSalt()Description copied from class:Tile
Используется для некого hashCode (при генерации seed карты), должен быть разным для каждого варианта тайла- Overrides:
generateSeedSalt
in classTile
-
getBaseColors
public com.badlogic.gdx.graphics.Color[] getBaseColors() -
getSphereColor
public com.badlogic.gdx.graphics.Color getSphereColor() -
sameAs
-
drawStatic
public void drawStatic(com.badlogic.gdx.graphics.g2d.SpriteCache spriteCache, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) Description copied from class:Tile
Отрисовать статическую графику, которая не будет меняться с момента загрузки карты.- Overrides:
drawStatic
in classTile
-
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) -
getInventorySubcategory
Description copied from class:Tile
Вызывается через Item- Specified by:
getInventorySubcategory
in classTile
-
getSortingScore
- Specified by:
getSortingScore
in classTile
-
isRoadType
public boolean isRoadType()- Specified by:
isRoadType
in classTile
-
from
-