Class RandomEncounterSystem

java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.GameSystem
com.prineside.tdi2.systems.RandomEncounterSystem
All Implemented Interfaces:
Disposable, KryoSerializable

public class RandomEncounterSystem extends GameSystem
  • Constructor Details

    • RandomEncounterSystem

      public RandomEncounterSystem()
  • Method Details

    • write

      public void write(Kryo kryo, Output output)
      Specified by:
      write in interface KryoSerializable
      Overrides:
      write in class Registrable
    • read

      public void read(Kryo kryo, Input input)
      Specified by:
      read in interface KryoSerializable
      Overrides:
      read in class Registrable
    • setup

      public void setup()
      Description copied from class: GameSystem
      Performs the initial configuration of the system. At the moment of call, systemProvider already contains all objects of systems.
      Overrides:
      setup in class GameSystem
    • canGiveStateAffectingRewards

      public boolean canGiveStateAffectingRewards()
    • postSetup

      public void postSetup()
      Description copied from class: GameSystem
      Performs the final configuration of the system. At the moment of call, all systems are already loaded and setup(), all listeners are already added.
      Overrides:
      postSetup in class GameSystem
    • postStateRestore

      public void postStateRestore()
      Overrides:
      postStateRestore in class GameSystem
    • isReceivedBonusLevelPass

      public boolean isReceivedBonusLevelPass()
    • startFireworks

      public void startFireworks(float mapX, float mapY)
    • setReceivedBonusLevelPass

      public void setReceivedBonusLevelPass(boolean receivedBonusLevelPass)
    • getEncounterTypes

      public Array<RandomEncounterSystem.EncounterType> getEncounterTypes()
      Can be modified in place but only after PostSetup of this system
    • getRewardTypes

      public Array<RandomEncounterSystem.RewardType> getRewardTypes()
      Can be modified in place but only after PostSetup of this system
    • getRandom

      public RandomXS128 getRandom()
    • selectRandomReward

      public RandomEncounterSystem.RewardType selectRandomReward()
    • update

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

      public void addBird(EncounterBird bird)
    • getActiveBirds

      public DelayedRemovalArray<EncounterBird> getActiveBirds()
    • startNewEncounter

      public void startNewEncounter()
    • birdAcceptAction

      public void birdAcceptAction(int birdIdx)
    • birdDeclineAction

      public void birdDeclineAction(int birdIdx)
    • affectsGameState

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

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

      public EncounterBird prepareDefaultBird(RandomEncounterSystem.BirdAction action)