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:
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[]floatFields inherited from class com.prineside.tdi2.Tile
boundingBox, center, enemyCount, highlightParticleA, highlightParticleB, type, visibleOnScreenFields inherited from class com.prineside.tdi2.Registrable
S -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSellItems(Array<ItemStack> toStacks) booleancanUpgradeBeInstalled(int col, int row) Использует поля для system (Upgrade.installed), вызывать только во время игрыvoiddrawBatch(Batch batch, float deltaTime, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) voiddrawStatic(Batch batch, float x, float y, float width, float height, Map map, MapRenderingSystem.DrawMode drawMode) voidfillItemCreationForm(ItemCreationOverlay overlay) voidfillMapEditorMenu(Table menuContainer, MapEditorItemInfoMenu menu) voidintИспользуется для некого hashCode (при генерации seed карты), должен быть разным для каждого варианта тайлаgenerateUiIcon(float tileSize) Сгенерировать stage2d Group для отображения тайла в UIColor[]floatvoidFill array with item data, key = ItemDataType, value = int / enum.ordinal() Called by TileItem#getData()floatfloatintgetIcon()Вызывается через ItemintgetLevel()getName()floatdoubleintgetSortingScore(ItemSortingType sortingType) getTier()getTitle()getUpgrade(int col, int row) intstatic intgetUpgradeIdx(CoreTile.Tier tier, int col, int row) intgetUpgradeInstallLevel(int col, int row) intgetUpgradeInstallLevelByIdx(int idx) intbooleanbooleanbooleanisValidUpgradePos(int col, int row) booleanvoidbooleanvoidsetExperience(float exp) Установка опыта напрямуюvoidsetExperienceGeneration(float val) voidvoidvoidsetRegistered(GameSystemProvider systemProvider) Mark this object as registered in the game state and give it a reference to the game state.voidsetTier(CoreTile.Tier tier) voidvoidsetUpgrade(int col, int row, CoreTile.Upgrade upgrade) voidsetUpgradeInstallLevel(int col, int row, int level) voidsetXpLevelRequirementFixed(boolean isFixed) voidvoidMethods inherited from class com.prineside.tdi2.Tile
affectedByLuckyWheelMultiplier, canBeSelected, canBeSold, canBeUpgraded, cloneTile, createUpgradedTile, drawExtras, drawHoveredRange, drawRoadStatic, drawSelectedRange, fillInventoryWithInfo, getBoundingBox, getUpgradePriceInAccelerators, getUpgradePriceInGreenPapers, getUpgradePriceInResources, getUserData, getValue, getWalkCost, getX, getY, postDrawBatch, removeExtrasForInventory, sameAsWithExtras, setPos, setUserData, toString, updateCacheMethods 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
-
doubleSpeedTimeLeft
public float doubleSpeedTimeLeft
-
-
Method Details
-
write
- Specified by:
writein interfaceKryoSerializable- Overrides:
writein classTile
-
read
- Specified by:
readin interfaceKryoSerializable- Overrides:
readin classTile
-
getData
Description copied from class:TileFill array with item data, key = ItemDataType, value = int / enum.ordinal() Called by TileItem#getData() -
setRegistered
Description copied from class:RegistrableMark this object as registered in the game state and give it a reference to the game state.- Overrides:
setRegisteredin classRegistrable- Parameters:
systemProvider- game state to link this object to, will be set to the S field.
-
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
-
setTierKeepLayout
-
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() -
getUpgradeInstallLevelByIdx
public int getUpgradeInstallLevelByIdx(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
-
getSphereColor
-
sameAs
-
drawStatic
public void drawStatic(Batch batch, float x, float y, float width, float height, Map map, MapRenderingSystem.DrawMode drawMode) - Overrides:
drawStaticin classTile
-
drawBatch
public void drawBatch(Batch batch, float deltaTime, float x, float y, float width, float height, MapRenderingSystem.DrawMode drawMode) -
generateUiIcon
Description copied from class:TileСгенерировать stage2d Group для отображения тайла в UI- Specified by:
generateUiIconin classTile
-
toJson
-
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
-
fillMapEditorMenu
- Overrides:
fillMapEditorMenuin classTile
-