public static void CopyFromOldDB() { Init(); if (instance.copiedFromOldDB) { return; } instance.copiedFromOldDB = true; instance.collectibleList = new List <Collectible>(CollectibleDB.Load1()); }
public static List <Collectible> Load() { GameObject obj = Resources.Load("DB_TDSTK/DB_Collectible", typeof(GameObject)) as GameObject; #if UNITY_EDITOR if (obj == null) { obj = CreatePrefab(); } #endif CollectibleDB instance = obj.GetComponent <CollectibleDB>(); return(instance.collectibleList); }
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); }
public static void SetCollectibleDB(CollectibleDB db, List <int> IDList, string[] label) { collectibleDB = db; collectibleIDList = IDList; collectibleLabel = label; }
public static void SetCollectibleDB(CollectibleDB db, List<int> IDList, string[] label) { collectibleDB=db; collectibleIDList=IDList; collectibleLabel=label; }
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); }