protected Node() { ID = Guid.NewGuid().ToString(); PrevNodeLinks = new List <StringField>(); SerializableRect = new SerializableRect(0, 0, 100, 100); Parameters = new Dictionary <string, NodeParameter>(); NodeChainName = "NodeChain"; }
//TODO: Add error checking code public static void Save() { saveObject = new SaveObject(); SaveEvent(typeof(SaveManager)); saveObject.levelsInfo = GameManager.Instance.levelsCleared; //Save the journal JournalSaveData js = new JournalSaveData(); if (Journal.Instance != null) { js.itemsInJournal = Journal.Instance.GetAllItemsInJournal(); //TODO: Add all acids, bases and neutral items as separate images in the resources folder. //Change how the images are being referenced //for storing the sprites, store all the textures. for (int i = 0; i < Journal.Instance.GetAllItemIconsInJournal().Count; i++) { js.itemIconsPath.Add(AssetDatabase.GetAssetPath(Journal.Instance.GetAllItemIconsInJournal()[i])); SerializableRect r = new SerializableRect(Journal.Instance.GetAllItemIconsInJournal()[i].rect.x, Journal.Instance.GetAllItemIconsInJournal()[i].rect.y, Journal.Instance.GetAllItemIconsInJournal()[i].rect.width, Journal.Instance.GetAllItemIconsInJournal()[i].rect.height); Debug.Log("Path: " + AssetDatabase.GetAssetPath(Journal.Instance.GetAllItemIconsInJournal()[i])); Debug.Log("x: " + r.x + "y: " + r.y + "width: " + r.width + "Height " + r.height); js.spriteRect.Add(r); } js.itemsDescriptions = Journal.Instance.GetAllItemDescriptionsInJournal(); saveObject.SaveJournal(js, localStoragePath, "Journal"); } MemoryManager.Save <SaveObject>(saveObject, xmlDocument, localStoragePath, saveFileName); }
public Rect Show() { node.rect = SerializableRect.FromRect(GUI.Window(windowIndex, node.rect.ToRect(), DoGUI, type.ToString())); return(node.rect.ToRect()); }
public Node(string title, SerializableRect rect) { this.title = title; this.rect = rect; }