Beispiel #1
0
 public static void Load()
 {
     if (File.Exists(SettingsPath))
     {
         SaveSettings ss = (SaveSettings) new XmlSerializer(typeof(SaveSettings)).Deserialize(new StreamReader(SettingsPath));
         WinSize  = ss.WinSize;
         LastIde  = ss.LastIde;
         useAPI   = ss.useAPI;
         Tutorial = true;
     }
     else
     {
         Vector2 windowLoc = new Vector2(Screen.width - 1200.0f, Screen.height - 400.0f);
         WinSize  = new Rect(100.0f, 20.0f, windowLoc.x, windowLoc.y);
         Tutorial = true;
         useAPI   = false;
         LastIde  = "";
     }
 }
Beispiel #2
0
 public static void Save()
 {
     SaveSettings ss = new SaveSettings(WinSize, LastIde, useAPI);
     new XmlSerializer(typeof (SaveSettings)).Serialize(new StreamWriter(SettingsPath, false), ss);
 }
Beispiel #3
0
        public static void Save()
        {
            SaveSettings ss = new SaveSettings(WinSize, LastIde, useAPI);

            new XmlSerializer(typeof(SaveSettings)).Serialize(new StreamWriter(SettingsPath, false), ss);
        }