Package jme3tools.savegame
Class SaveGame
java.lang.Object
jme3tools.savegame.SaveGame
Tool for saving Savables as SaveGame entries in a system-dependent way.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Savable
Loads a savable that has been saved on this system with saveGame() before.static Savable
loadGame
(String gamePath, String dataName, AssetManager manager) Loads a savable that has been saved on this system with saveGame() before.static Savable
loadGame
(String gamePath, String dataName, AssetManager manager, JmeSystem.StorageFolderType storageType) Loads a savable that has been saved on this system with saveGame() before.static Savable
loadGame
(String gamePath, String dataName, JmeSystem.StorageFolderType storageType) Loads a savable that has been saved on this system with saveGame() before.static void
Saves a savable in a system-dependent way.static void
saveGame
(String gamePath, String dataName, Savable data, JmeSystem.StorageFolderType storageType) Saves a savable in a system-dependent way.
-
Method Details
-
saveGame
Saves a savable in a system-dependent way.- Parameters:
gamePath
- A unique path for this game, e.g. com/mycompany/mygamedataName
- A unique name for this SaveGame, e.g. "save_001"data
- The Savable to save
-
saveGame
public static void saveGame(String gamePath, String dataName, Savable data, JmeSystem.StorageFolderType storageType) Saves a savable in a system-dependent way.- Parameters:
gamePath
- A unique path for this game, e.g. com/mycompany/mygamedataName
- A unique name for this SaveGame, e.g. "save_001"data
- The Savable to savestorageType
- The specific type of folder to use to save the data
-
loadGame
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/mygamedataName
- A unique name for this SaveGame, e.g. "save_001"- Returns:
- The savable that was saved
-
loadGame
public static Savable loadGame(String gamePath, String dataName, JmeSystem.StorageFolderType storageType) 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/mygamedataName
- A unique name for this SaveGame, e.g. "save_001"storageType
- The specific type of folder to use to save the data- Returns:
- The savable that was saved
-
loadGame
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/mygamedataName
- 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
-
loadGame
public static Savable loadGame(String gamePath, String dataName, AssetManager manager, JmeSystem.StorageFolderType storageType) 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/mygamedataName
- 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)storageType
- The specific type of folder to use to save the data- Returns:
- The savable that was saved or null if none was found
-