public static void Init() { // Get existing open window or if none, make a new one: window = (AbilityEditorWindow)EditorWindow.GetWindow(typeof(AbilityEditorWindow)); //~ window.minSize=new Vector2(375, 449); //~ window.maxSize=new Vector2(375, 800); prefab = AbilityDB.LoadDB(); abilityList = prefab.abilityList; for (int i = 0; i < abilityList.Count; i++) { //towerList[i].prefabID=i; if (abilityList[i] != null) { abilityIDList.Add(abilityList[i].ID); } else { abilityList.RemoveAt(i); i -= 1; } } InitLabel(); }
private static void LoadAbility() { abilityPrefabDB = AbilityDB.LoadDB(); abilityList = abilityPrefabDB.abilityList; for (int i = 0; i < abilityList.Count; i++) { //abilityList[i].ID=i; if (abilityList[i] != null) { abilityIDList.Add(abilityList[i].ID); } else { abilityList.RemoveAt(i); i -= 1; } } UpdateAbilityNameList(); }
public static void LoadAbility() { abilityDB = AbilityDB.LoadDB(); for (int i = 0; i < abilityDB.abilityList.Count; i++) { if (abilityDB.abilityList[i] != null) { abilityIDList.Add(abilityDB.abilityList[i].ID); } else { abilityDB.abilityList.RemoveAt(i); i -= 1; } } UpdateLabel_Ability(); TDEditorWindow.SetAbilityDB(abilityDB, abilityIDList, abilityLabel); TDEditorInspector.SetAbilityDB(abilityDB, abilityIDList, abilityLabel); }