Class BonusSystem

All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, com.esotericsoftware.kryo.KryoSerializable

public final class BonusSystem extends GameSystem
Issues GameplayMods as bonuses
  • Field Details

    • GAMEPLAY_MOD_SOURCE_NAME

      public static final String GAMEPLAY_MOD_SOURCE_NAME
      See Also:
    • MAX_TECHNICAL_BONUS_STAGES

      public static final int MAX_TECHNICAL_BONUS_STAGES
      See Also:
    • FORCED_SELECTION_MAX_FRAME_DELAY

      public static final int FORCED_SELECTION_MAX_FRAME_DELAY
      See Also:
    • BONUSES_TO_CHOOSE_COUNT

      public static final int BONUSES_TO_CHOOSE_COUNT
      See Also:
    • additionalBonusToSelectFrom

      public boolean additionalBonusToSelectFrom
    • autoSelectionOnSingleBonus

      public boolean autoSelectionOnSingleBonus
    • selectedBonuses

      public com.badlogic.gdx.utils.IntArray selectedBonuses
    • stageReRolls

      public com.badlogic.gdx.utils.IntArray stageReRolls
  • Constructor Details

    • BonusSystem

      public BonusSystem()
  • 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 Registrable
    • 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 Registrable
    • getBonusesToChooseCount

      public int getBonusesToChooseCount()
    • isAutoSelectionOnSingleBonus

      public boolean isAutoSelectionOnSingleBonus()
    • setAutoSelectionOnSingleBonus

      public void setAutoSelectionOnSingleBonus(boolean autoSelectionOnSingleBonus)
    • getStageToChooseBonusFor

      @Null public BonusSystem.BonusStage getStageToChooseBonusFor()
    • getMaxBonusStages

      public int getMaxBonusStages()
    • getMaxTechnicalBonusStages

      public int getMaxTechnicalBonusStages()
    • getAllTimeReRollCount

      public int getAllTimeReRollCount()
    • canReRollBonuses

      public boolean canReRollBonuses(int stageNumber)
      Returns:
      true if it is possible to re-roll bonuses. Only available for procedural bonuses
    • getActiveBonusesCount

      public int getActiveBonusesCount()
    • isEnabled

      public boolean isEnabled()
      Returns:
      true if system is active and BonusStagesConfig is set
    • addProgressPoints

      public void addProgressPoints(int cnt)
    • affectsGameState

      public boolean affectsGameState()
      Specified by:
      affectsGameState in class GameSystem
    • setup

      public void setup()
      Description copied from class: GameSystem
      Произвести начальную настройку системы. На момент вызова этого метода, systemProvider содержит объекты всех систем.
      Overrides:
      setup in class GameSystem
    • setStagesConfig

      public void setStagesConfig(BonusStagesConfig config)
      Resets stages and starts with stage 1 Existing bonuses won't be affected If seed is set to SEED_TAKE_FROM_LEVEL (-1), it will be copied from the main seed If seed is set to SEED_TAKE_FROM_DAILY_QUEST (-2), it will be generated from the daily quest date or, if absent, will act as SEED_TAKE_FROM_LEVEL Stores a copy of the config and does not mutate the original config
    • getBonusStage

      public BonusSystem.BonusStage getBonusStage(int stageNum)
    • getStagesConfig

      public BonusStagesConfig getStagesConfig()
    • reRollBonusesAction

      public void reRollBonusesAction()
    • selectBonusAction

      public void selectBonusAction(int bonusIdx)
    • setSelectedBonus

      public void setSelectedBonus(int stageNum, int bonusIdx)
    • reRollBonuses

      public void reRollBonuses()
    • getPreparedRandom

      public com.badlogic.gdx.math.RandomXS128 getPreparedRandom(int forStage)
    • resetState

      public void resetState()
    • getCurrentlyProgressingStage

      public int getCurrentlyProgressingStage()
    • getCurrentVisualProgressStageNumber

      public int getCurrentVisualProgressStageNumber()
    • getCurrentVisualProgressPoints

      public int getCurrentVisualProgressPoints()
    • getNextStagePointsRequirement

      public int getNextStagePointsRequirement()
    • bonusSelectionAvailable

      public boolean bonusSelectionAvailable()
    • update

      public void update(float deltaTime)
      Overrides:
      update in class GameSystem
    • getSystemName

      public String getSystemName()
      Specified by:
      getSystemName in class GameSystem
    • dispose

      public void dispose()
      Description copied from interface: com.badlogic.gdx.utils.Disposable
      Releases all resources of this object.
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
      Overrides:
      dispose in class GameSystem