Beispiel #1
0
        public static void UpdateLabel_DamageTable()
        {
            damageTypeLabel = new string[damageTableDB.damageTypeList.Count];
            for (int i = 0; i < damageTableDB.damageTypeList.Count; i++)
            {
                damageTypeLabel[i] = damageTableDB.damageTypeList[i].name;
                if (damageTypeLabel[i] == "")
                {
                    damageTypeLabel[i] = "unnamed";
                }
            }

            armorTypeLabel = new string[damageTableDB.armorTypeList.Count];
            for (int i = 0; i < damageTableDB.armorTypeList.Count; i++)
            {
                armorTypeLabel[i] = damageTableDB.armorTypeList[i].name;
                if (armorTypeLabel[i] == "")
                {
                    armorTypeLabel[i] = "unnamed";
                }
            }

            TBEditorWindow.SetDamageDB(damageTableDB, damageTypeLabel, armorTypeLabel);
            TBEditorInspector.SetDamageDB(damageTableDB, damageTypeLabel, armorTypeLabel);

            dirty = !dirty;
        }
Beispiel #2
0
        public static void LoadDamageTable()
        {
            damageTableDB = DamageTableDB.LoadDB();
            UpdateLabel_DamageTable();

            TBEditorWindow.SetDamageDB(damageTableDB, damageTypeLabel, armorTypeLabel);
            TBEditorInspector.SetDamageDB(damageTableDB, damageTypeLabel, armorTypeLabel);
        }
Beispiel #3
0
        public static void LoadCollectible()
        {
            collectibleDB = CollectibleDB.LoadDB();

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

            UpdateLabel_Collectible();

            TBEditorWindow.SetCollectibleDB(collectibleDB, collectibleIDList, collectibleLabel);
            TBEditorInspector.SetCollectibleDB(collectibleDB, collectibleIDList, collectibleLabel);
        }
Beispiel #4
0
        public static void LoadPerk()
        {
            perkDB = PerkDB.LoadDB();

            for (int i = 0; i < perkDB.perkList.Count; i++)
            {
                if (perkDB.perkList[i] != null)
                {
                    perkIDList.Add(perkDB.perkList[i].prefabID);
                }
                else
                {
                    perkDB.perkList.RemoveAt(i);      i -= 1;
                }
            }

            UpdateLabel_Perk();

            TBEditorWindow.SetPerkDB(perkDB, perkIDList, perkLabel);
            TBEditorInspector.SetPerkDB(perkDB, perkIDList, perkLabel);
        }
Beispiel #5
0
        public static void LoadFactionAbility()
        {
            fAbilityDB = FactionAbilityDB.LoadDB();

            for (int i = 0; i < fAbilityDB.abilityList.Count; i++)
            {
                if (fAbilityDB.abilityList[i] != null)
                {
                    fAbilityIDList.Add(fAbilityDB.abilityList[i].prefabID);
                }
                else
                {
                    fAbilityDB.abilityList.RemoveAt(i);       i -= 1;
                }
            }

            UpdateLabel_FactionAbility();

            TBEditorWindow.SetAbilityDB(fAbilityDB, fAbilityIDList, fAbilityLabel);
            TBEditorInspector.SetAbilityDB(fAbilityDB, fAbilityIDList, fAbilityLabel);
        }
Beispiel #6
0
        public static void LoadUnitAbility()
        {
            uAbilityDB = UnitAbilityDB.LoadDB();

            for (int i = 0; i < uAbilityDB.abilityList.Count; i++)
            {
                if (uAbilityDB.abilityList[i] != null)
                {
                    uAbilityIDList.Add(uAbilityDB.abilityList[i].prefabID);
                }
                else
                {
                    uAbilityDB.abilityList.RemoveAt(i);       i -= 1;
                }
            }

            UpdateLabel_UnitAbility();

            TBEditorWindow.SetAbilityDB(uAbilityDB, uAbilityIDList, uAbilityLabel);
            TBEditorInspector.SetAbilityDB(uAbilityDB, uAbilityIDList, uAbilityLabel);
        }
Beispiel #7
0
        public static void LoadUnit()
        {
            unitDB = UnitDB.LoadDB();

            for (int i = 0; i < unitDB.unitList.Count; i++)
            {
                if (unitDB.unitList[i] != null)
                {
                    unitIDList.Add(unitDB.unitList[i].prefabID);
                }
                else
                {
                    unitDB.unitList.RemoveAt(i);      i -= 1;
                }
            }

            UpdateLabel_Unit();

            TBEditorWindow.SetUnitDB(unitDB, unitIDList, unitLabel);
            TBEditorInspector.SetUnitDB(unitDB, unitIDList, unitLabel);
        }
Beispiel #8
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].itemName;
                if (name == "")
                {
                    name = "unnamed";
                }
                while (Array.IndexOf(collectibleLabel, name) >= 0)
                {
                    name += "_";
                }
                collectibleLabel[i + 1] = name;
            }

            TBEditorWindow.SetCollectibleDB(collectibleDB, collectibleIDList, collectibleLabel);
            TBEditorInspector.SetCollectibleDB(collectibleDB, collectibleIDList, collectibleLabel);

            dirty = !dirty;
        }
Beispiel #9
0
        public static void UpdateLabel_Perk()
        {
            perkLabel    = new string[perkDB.perkList.Count + 1];
            perkLabel[0] = "Unassigned";
            for (int i = 0; i < perkDB.perkList.Count; i++)
            {
                string name = perkDB.perkList[i].name;
                if (name == "")
                {
                    name = "unnamed";
                }
                while (Array.IndexOf(perkLabel, name) >= 0)
                {
                    name += "_";
                }
                perkLabel[i + 1] = name;
            }

            TBEditorWindow.SetPerkDB(perkDB, perkIDList, perkLabel);
            TBEditorInspector.SetPerkDB(perkDB, perkIDList, perkLabel);

            dirty = !dirty;
        }
Beispiel #10
0
        public static void UpdateLabel_FactionAbility()
        {
            fAbilityLabel    = new string[fAbilityDB.abilityList.Count + 1];
            fAbilityLabel[0] = "Unassigned";
            for (int i = 0; i < fAbilityDB.abilityList.Count; i++)
            {
                string name = fAbilityDB.abilityList[i].name;
                if (name == "")
                {
                    name = "unnamed";
                }
                while (Array.IndexOf(fAbilityLabel, name) >= 0)
                {
                    name += "_";
                }
                fAbilityLabel[i + 1] = name;
            }

            TBEditorWindow.SetAbilityDB(fAbilityDB, fAbilityIDList, fAbilityLabel);
            TBEditorInspector.SetAbilityDB(fAbilityDB, fAbilityIDList, fAbilityLabel);

            dirty = !dirty;
        }
Beispiel #11
0
        public static void UpdateLabel_Unit()
        {
            unitLabel    = new string[unitDB.unitList.Count + 1];
            unitLabel[0] = "Unassigned";
            for (int i = 0; i < unitDB.unitList.Count; i++)
            {
                string name = unitDB.unitList[i].unitName;
                if (name == "")
                {
                    name = "unnamed";
                }
                while (Array.IndexOf(unitLabel, name) >= 0)
                {
                    name += "_";
                }
                unitLabel[i + 1] = name;
            }

            TBEditorWindow.SetUnitDB(unitDB, unitIDList, unitLabel);
            TBEditorInspector.SetUnitDB(unitDB, unitIDList, unitLabel);

            dirty = !dirty;
        }