Package ruscz.game.gameOfProd.Save
Class LoadManager
- java.lang.Object
-
- ruscz.game.gameOfProd.Save.LoadManager
-
public class LoadManager extends java.lang.ObjectThis class manages loading all saved data into current game
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.logging.LoggerLOGprivate MapManagermapManagerprivate WindowOfFreeMovewindow
-
Constructor Summary
Constructors Constructor Description LoadManager(MapManager mapManager)
-
Method Summary
Modifier and Type Method Description voidclearSave()Clears all save filesprivate java.lang.StringgetValue(java.lang.String line)static booleanisSaveEmpty()Checks if save files are empty (if there is no saved progress)private voidloadEvents()Loads all events(triggers, chests and doors) from file and sets them corresponding attributesprivate voidloadInventory()Loads hero's inventory from fileprivate voidloadMaps()Loads maps in current chaptervoidloadNewGame()Loads new gameprivate voidloadNpcs()Loads all NPCsprivate voidloadPerson()Loads hero's position from filevoidloadSavedGame()Loads new game and aplicates current progress
-
-
-
Field Detail
-
mapManager
private final MapManager mapManager
-
window
private final WindowOfFreeMove window
-
LOG
private static final java.util.logging.Logger LOG
-
-
Constructor Detail
-
LoadManager
public LoadManager(MapManager mapManager)
-
-
Method Detail
-
isSaveEmpty
public static boolean isSaveEmpty()
Checks if save files are empty (if there is no saved progress)- Returns:
- are save files empty
-
loadNewGame
public void loadNewGame()
Loads new game
-
loadSavedGame
public void loadSavedGame()
Loads new game and aplicates current progress
-
clearSave
public void clearSave()
Clears all save files
-
loadMaps
private void loadMaps()
Loads maps in current chapter
-
loadNpcs
private void loadNpcs()
Loads all NPCs
-
loadPerson
private void loadPerson()
Loads hero's position from file
-
loadEvents
private void loadEvents()
Loads all events(triggers, chests and doors) from file and sets them corresponding attributes
-
loadInventory
private void loadInventory()
Loads hero's inventory from file
-
getValue
private java.lang.String getValue(java.lang.String line)
-
-