Class GameStateManager
java.lang.Object
com.toxicrain.rainengine.core.json.gamestate.GameStateManager
GameStateManager handles saving and loading of game state data.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GameState
loadGameState
(String filePath) Loads a GameState from a JSON file.static void
saveGameState
(GameState gameState, String filePath) Saves the given GameState to a JSON file.
-
Constructor Details
-
GameStateManager
public GameStateManager()
-
-
Method Details
-
saveGameState
Saves the given GameState to a JSON file.- Parameters:
gameState
- The GameState object to save.filePath
- The path to the file where the game state will be saved.
-
loadGameState
Loads a GameState from a JSON file.- Parameters:
filePath
- The path to the file from which the game state will be loaded.- Returns:
- The loaded GameState object.
-