Class CoreTile

All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable

public final class CoreTile extends Tile
  • 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
    • predefinedType

      public PredefinedCoreTileType 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)
      Specified by:
      write in interface com.esotericsoftware.kryo.KryoSerializable
      Overrides:
      write in class Tile
    • read

      public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input)
      Specified by:
      read in interface com.esotericsoftware.kryo.KryoSerializable
      Overrides:
      read in class Tile
    • getData

      public void getData(com.badlogic.gdx.utils.IntArray data)
      Description copied from class: Tile
      Наполнить массив данными (по очереди, ключ (ItemDataType) - значение (int / enum.ordinal())
      Overrides:
      getData in class Tile
    • setRegistered

      public void setRegistered(GameSystemProvider systemProvider)
      Overrides:
      setRegistered in class Registrable
    • 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

      public String getName()
    • getTier

      public CoreTile.Tier getTier()
    • setTier

      public void setTier(CoreTile.Tier tier)
    • addSellItems

      public void addSellItems(com.badlogic.gdx.utils.Array<ItemStack> toStacks)
      Overrides:
      addSellItems in class Tile
    • getPrestigeScore

      public double getPrestigeScore()
      Specified by:
      getPrestigeScore in class Tile
      Returns:
      кол-во очков престижа за продажу. Если 0 или меньше, не будет продан. 1 score = 1 dust
    • getUpgrades

      public com.badlogic.gdx.utils.Array<CoreTile.Upgrade> getUpgrades()
    • getTitle

      public CharSequence getTitle()
      Overrides:
      getTitle in class Tile
    • setName

      public void setName(String name)
    • getIcon

      public String getIcon()
    • setIcon

      public void setIcon(String icon)
    • getDescription

      public CharSequence getDescription()
      Overrides:
      getDescription in class Tile
    • getRarity

      public RarityType getRarity()
      Specified by:
      getRarity in class Tile
    • 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

      public static int getUpgradeIdx(CoreTile.Tier tier, int col, int row)
    • getUpgrade

      public CoreTile.Upgrade getUpgrade(int col, int row)
    • canUpgradeBeInstalled

      public boolean canUpgradeBeInstalled(int col, int row)
      Использует поля для system (Upgrade.installed), вызывать только во время игры
    • setUpgrade

      public void setUpgrade(int col, int row, CoreTile.Upgrade upgrade)
    • generateSeedSalt

      public int generateSeedSalt()
      Description copied from class: Tile
      Используется для некого hashCode (при генерации seed карты), должен быть разным для каждого варианта тайла
      Overrides:
      generateSeedSalt in class Tile
    • getBaseColors

      public com.badlogic.gdx.graphics.Color[] getBaseColors()
    • getSphereColor

      public com.badlogic.gdx.graphics.Color getSphereColor()
    • sameAs

      public boolean sameAs(Tile tile)
      Overrides:
      sameAs in class Tile
      Returns:
      true, если характеристики двух тайлов одинаковы (без учета позиции)
    • 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 class Tile
    • drawBatch

      public void drawBatch(com.badlogic.gdx.graphics.g2d.Batch batch, float deltaTime, int x, int y)
      Description copied from class: Tile
      Перед отрисовкой врагов и прочего (сразу после отрисовки карты)
      Overrides:
      drawBatch in 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 class Tile
    • toJson

      public void toJson(com.badlogic.gdx.utils.Json json)
      Overrides:
      toJson in class Tile
    • getInventorySubcategory

      public ItemSubcategoryType getInventorySubcategory()
      Description copied from class: Tile
      Вызывается через Item
      Specified by:
      getInventorySubcategory in class Tile
    • getSortingScore

      public int getSortingScore(ItemSortingType sortingType)
      Specified by:
      getSortingScore in class Tile
    • isRoadType

      public boolean isRoadType()
      Specified by:
      isRoadType in class Tile
    • from

      public void from(Tile copyFrom)
      Overrides:
      from in class Tile
    • fillItemCreationForm

      public void fillItemCreationForm(ItemCreationOverlay overlay)
      Overrides:
      fillItemCreationForm in class Tile