Esempio n. 1
0
        public static void UpdateLabel_Collectible()
        {
            collectibleLabel    = new string[collectibleDB.collectibleList.Count + 1];
            collectibleLabel[0] = "Unassigned";
            for (int i = 0; i < collectibleDB.collectibleList.Count; i++)
            {
                string name = collectibleDB.collectibleList[i].name;
                if (name == "")
                {
                    name = "unnamed";
                }
                while (Array.IndexOf(collectibleLabel, name) >= 0)
                {
                    name += "_";
                }
                collectibleLabel[i + 1] = name;
            }

            TDSEditorWindow.SetCollectibleDB(collectibleDB, collectibleIDList, collectibleLabel);
            TDSEditorInspector.SetCollectibleDB(collectibleDB, collectibleIDList, collectibleLabel);

            dirty = !dirty;
        }
Esempio n. 2
0
        public static void LoadCollectible()
        {
            collectibleDB = CollectibleDB.LoadDB();

            for (int i = 0; i < collectibleDB.collectibleList.Count; i++)
            {
                if (collectibleDB.collectibleList[i] != null)
                {
                    //collectibleDB.collectibleList[i].ID=i;
                    collectibleIDList.Add(collectibleDB.collectibleList[i].ID);
                }
                else
                {
                    collectibleDB.collectibleList.RemoveAt(i);
                    i -= 1;
                }
            }

            UpdateLabel_Collectible();

            TDSEditorWindow.SetCollectibleDB(collectibleDB, collectibleIDList, collectibleLabel);
            TDSEditorInspector.SetCollectibleDB(collectibleDB, collectibleIDList, collectibleLabel);
        }