Beispiel #1
0
        public static ScreenObject Load(string name)
        {
            ScreenObject load = new ScreenObject();

            load.LoadFromString(File.ReadAllText(GetSavePathFromName(name)));

            return(load);
        }
Beispiel #2
0
 static void TryRemoveScreenObject(ScreenObject screenObject)
 {
     if (!screenObjects.Contains(screenObject))   // Can the object be removed?
     {
         DebugManager.LogError($"ScreenObject {screenObject} cannot be removed because it does not exist.");
         return;
     }
     screenObjects.Remove(screenObject);
 }
Beispiel #3
0
        static void TryAddScreenObject(ScreenObject screenObject)
        {
            if (screenObjects.Count >= MaxOnscreen)   // Is there room?
            {
                DebugManager.LogError($"Attempt to add ScreenObject {screenObject} failed: No room.");
                return;
            }

            screenObjects.Add(screenObject);
            DebugManager.LogInfo($"Successfully added ScreenObject {screenObject}.");
        }
Beispiel #4
0
 public static void Save(ScreenObject screenObject)
 {
     File.WriteAllText(GetSavePathFromName(screenObject.name), screenObject.Save());
 }