Package com.prineside.tdi2.systems
Class GameplayModSystem
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.GameSystem
com.prineside.tdi2.systems.GameplayModSystem
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable,com.esotericsoftware.kryo.KryoSerializable
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.prineside.tdi2.Registrable
S -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivateMod(GameplayMod mod, String activatedBy) booleanvoiddispose()Releases all resources of this object.<T extends GameplayMod>
GameplayModSystem.ActiveModgetActiveMod(Class<T> type) <T extends GameplayMod>
GameplayModSystem.ActiveModgetActiveMod(Class<T> type, String source) com.badlogic.gdx.utils.DelayedRemovalArray<GameplayModSystem.ActiveMod>com.badlogic.gdx.math.RandomXS128getModRandom(int seed) voidread(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) voidwrite(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) Methods inherited from class com.prineside.tdi2.GameSystem
getFastStateHash, postSetup, postStateRestore, profileUpdate, setup, updateMethods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered
-
Constructor Details
-
GameplayModSystem
public GameplayModSystem()
-
-
Method Details
-
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) - Specified by:
writein interfacecom.esotericsoftware.kryo.KryoSerializable- Overrides:
writein classRegistrable
-
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
readin interfacecom.esotericsoftware.kryo.KryoSerializable- Overrides:
readin classRegistrable
-
affectsGameState
public boolean affectsGameState()- Specified by:
affectsGameStatein classGameSystem
-
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
-
getActiveMod
@Null public <T extends GameplayMod> GameplayModSystem.ActiveMod getActiveMod(Class<T> type, String source) -
getActiveMod
-
activateMod
-
getSystemName
- Specified by:
getSystemNamein classGameSystem
-
dispose
public void dispose()Description copied from interface:com.badlogic.gdx.utils.DisposableReleases all resources of this object.- Specified by:
disposein interfacecom.badlogic.gdx.utils.Disposable- Overrides:
disposein classGameSystem
-