Example #1
0
        private static void LoadFPSWeapon()
        {
            fpsWeaponDBPrefab = FPSWeaponDB.LoadDB();
            weaponList        = fpsWeaponDBPrefab.weaponList;

            for (int i = 0; i < weaponList.Count; i++)
            {
                //weaponList[i].prefabID=i;
                if (weaponList[i] != null)
                {
                    weaponIDList.Add(weaponList[i].prefabID);
                    if (weaponList[i].stats.Count == 0)
                    {
                        weaponList[i].stats.Add(new UnitStat());
                    }
                }
                else
                {
                    weaponList.RemoveAt(i);
                    i -= 1;
                }
            }

            UpdateWeaponNameList();
        }
Example #2
0
        public static void LoadFPSWeapon()
        {
            fpsWeaponDB = FPSWeaponDB.LoadDB();

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

            UpdateLabel_FPSWeapon();

            TDEditorWindow.SetFPSWeaponDB(fpsWeaponDB, fpsWeaponIDList, fpsWeaponLabel);
            TDEditorInspector.SetFPSWeaponDB(fpsWeaponDB, fpsWeaponIDList, fpsWeaponLabel);
        }