Class GameplayModSystem

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

public final class GameplayModSystem extends GameSystem
  • Constructor Details

    • GameplayModSystem

      public GameplayModSystem()
  • 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
    • affectsGameState

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

      public com.badlogic.gdx.math.RandomXS128 getModRandom(int seed)
      Parameters:
      seed - must be a static value for some particular mod. It will be mixed with map's seed and will always produce the same generator
      Returns:
      instance of random number generator specifically for GameplayMod#register()
    • getActiveMods

      public com.badlogic.gdx.utils.DelayedRemovalArray<GameplayModSystem.ActiveMod> getActiveMods()
    • getActiveMod

      @Null public <T extends GameplayMod> GameplayModSystem.ActiveMod getActiveMod(Class<T> type, String source)
    • getActiveMod

      @Null public <T extends GameplayMod> GameplayModSystem.ActiveMod getActiveMod(Class<T> type)
    • activateMod

      public void activateMod(GameplayMod mod, String activatedBy)
    • 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