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 classstatic enumstatic enumstatic classNested classes/interfaces inherited from class com.prineside.tdi2.Tile
Tile.Factory<T extends Tile>, Tile.Pos -
Field Summary
FieldsModifier and TypeFieldDescriptionfloatstatic final intstatic final int[]static final int[]static final int[]static final intstatic final int[]static final int[]floatcom.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffectFields inherited from class com.prineside.tdi2.Tile
boundingBox, center, enemyCount, highlightParticleA, highlightParticleB, type, userData, visibleOnScreenFields inherited from class com.prineside.tdi2.Registrable
S -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSellItems(com.badlogic.gdx.utils.Array<ItemStack> toStacks) booleancanUpgradeBeInstalled(int col, int row) Использует поля для system (Upgrade.installed), вызывать только во время игрыvoiddrawBatch(com.badlogic.gdx.graphics.g2d.Batch batch, float deltaTime, int x, int y) Перед отрисовкой врагов и прочего (сразу после отрисовки карты)voiddrawStatic(com.badlogic.gdx.graphics.g2d.SpriteCache spriteCache, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) Отрисовать статическую графику, которая не будет меняться с момента загрузки карты.voidfillItemCreationForm(ItemCreationOverlay overlay) voidintИспользуется для некого hashCode (при генерации seed карты), должен быть разным для каждого варианта тайлаcom.badlogic.gdx.scenes.scene2d.GroupgenerateUiIcon(float tileSize) Сгенерировать stage2d Group для отображения тайла в UIcom.badlogic.gdx.graphics.Color[]floatvoidgetData(com.badlogic.gdx.utils.IntArray data) Наполнить массив данными (по очереди, ключ (ItemDataType) - значение (int / enum.ordinal())floatfloatintgetIcon()Вызывается через ItemintgetLevel()getName()floatdoubleintgetSortingScore(ItemSortingType sortingType) com.badlogic.gdx.graphics.ColorgetTier()getTitle()getUpgrade(int col, int row) intstatic intgetUpgradeIdx(CoreTile.Tier tier, int col, int row) intgetUpgradeInstallLevel(int idx) intgetUpgradeInstallLevel(int col, int row) intcom.badlogic.gdx.utils.Array<CoreTile.Upgrade>booleanbooleanbooleanisValidUpgradePos(int col, int row) booleanvoidread(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) booleanvoidsetExperience(float exp) Установка опыта напрямуюvoidsetExperienceGeneration(float val) voidvoidvoidsetRegistered(GameSystemProvider systemProvider) voidsetTier(CoreTile.Tier tier) voidsetUpgrade(int col, int row, CoreTile.Upgrade upgrade) voidsetUpgradeInstallLevel(int col, int row, int level) voidsetXpLevelRequirementFixed(boolean isFixed) voidtoJson(com.badlogic.gdx.utils.Json json) voidwrite(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, getQuality, getUpgradePriceInAccelerators, getUpgradePriceInGreenPapers, getUpgradePriceInResources, getUserData, getValue, getWalkCost, getX, getY, postDrawBatch, setMap, setPos, setUserData, toString, traverseNeighbourTiles, traverseNeighbourTilesAndThisMethods 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
-
-
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:
setRegisteredin 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:
addSellItemsin classTile
-
getPrestigeScore
public double getPrestigeScore()- Specified by:
getPrestigeScorein classTile- Returns:
- кол-во очков престижа за продажу. Если 0 или меньше, не будет продан. 1 score = 1 dust
-
getUpgrades
-
getTitle
-
setName
-
getIcon
-
setIcon
-
getDescription
- Overrides:
getDescriptionin 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:
generateSeedSaltin 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:
drawStaticin 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:
generateUiIconin classTile
-
toJson
public void toJson(com.badlogic.gdx.utils.Json json) -
getInventorySubcategory
Description copied from class:TileВызывается через Item- Specified by:
getInventorySubcategoryin classTile
-
getSortingScore
- Specified by:
getSortingScorein classTile
-
isRoadType
public boolean isRoadType()- Specified by:
isRoadTypein classTile
-
from
-