Class GameStateManager

java.lang.Object
com.toxicrain.rainengine.core.json.gamestate.GameStateManager

public class GameStateManager extends Object
GameStateManager handles saving and loading of game state data.
  • Constructor Details

    • GameStateManager

      public GameStateManager()
  • Method Details

    • saveGameState

      public static void saveGameState(GameState gameState, String filePath)
      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

      public static GameState loadGameState(String filePath)
      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.