Ejemplo n.º 1
0
 /// <summary>
 /// Verifies the options were loaded in, otherwise defaults are used.
 /// </summary>
 /// <param name="aStream"></param>
 public static void LoadOptions(EndevGame.FileStream aStream)
 {
     EndevGame.File loadFile = aStream.Get(Game.FILE_OPTIONS);
     if(loadFile != null)
     {
         OptionsSavedData loadedData = loadFile.GetFirst<OptionsSavedData>();
         if(loadedData != null)
         {
             return;
         }
     }
     SetDefaults();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Adds a options file as well as a options saved data to get the data.
 /// </summary>
 /// <param name="aStream"></param>
 public static void SaveOptions(EndevGame.FileStream aStream)
 {
     EndevGame.File loadFile = aStream.Get(Game.FILE_OPTIONS);
     if(loadFile == null)
     {
         loadFile = aStream.Add(Game.FILE_OPTIONS);
     }
     loadFile.Clear();
     loadFile.Add(new OptionsSavedData());
 }