jme3tools.savegame
Class SaveGame

java.lang.Object
  extended by jme3tools.savegame.SaveGame

public class SaveGame
extends java.lang.Object

Tool for saving Savables as SaveGame entries in a system-dependent way.


Constructor Summary
SaveGame()
           
 
Method Summary
static Savable loadGame(java.lang.String gamePath, java.lang.String dataName)
          Loads a savable that has been saved on this system with saveGame() before.
static Savable loadGame(java.lang.String gamePath, java.lang.String dataName, AssetManager manager)
          Loads a savable that has been saved on this system with saveGame() before.
static void saveGame(java.lang.String gamePath, java.lang.String dataName, Savable data)
          Saves a savable in a system-dependent way.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SaveGame

public SaveGame()
Method Detail

saveGame

public static void saveGame(java.lang.String gamePath,
                            java.lang.String dataName,
                            Savable data)
Saves a savable in a system-dependent way.

Parameters:
gamePath - A unique path for this game, e.g. com/mycompany/mygame
dataName - A unique name for this savegame, e.g. "save_001"
data - The Savable to save

loadGame

public static Savable loadGame(java.lang.String gamePath,
                               java.lang.String dataName)
Loads a savable that has been saved on this system with saveGame() before.

Parameters:
gamePath - A unique path for this game, e.g. com/mycompany/mygame
dataName - A unique name for this savegame, e.g. "save_001"
Returns:
The savable that was saved

loadGame

public static Savable loadGame(java.lang.String gamePath,
                               java.lang.String dataName,
                               AssetManager manager)
Loads a savable that has been saved on this system with saveGame() before.

Parameters:
gamePath - A unique path for this game, e.g. com/mycompany/mygame
dataName - A unique name for this savegame, e.g. "save_001"
manager - Link to an AssetManager if required for loading the data (e.g. models with textures)
Returns:
The savable that was saved or null if none was found