Package com.mygdx.utils
Class SaveObject
- java.lang.Object
-
- com.mygdx.utils.SaveObject
-
public final class SaveObject extends java.lang.ObjectNEW This classes job is to hold all the data needed to reconstruct the game state Its the object that will be written using serilisation to a file
-
-
Constructor Summary
Constructors Constructor Description SaveObject()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidreadXML(java.lang.String path)Loads a saved game which is an XML filestatic voidwriteXMl(java.lang.String path)A method which saves the Game to XML using a STAX parser
-
-
-
Method Detail
-
writeXMl
public static void writeXMl(java.lang.String path)
A method which saves the Game to XML using a STAX parser- Parameters:
path- The path to where the file will be saved
-
readXML
public static void readXML(java.lang.String path)
Loads a saved game which is an XML file- Parameters:
path- the path to the XML file that the method will load
-
-