Esempio n. 1
0
    public void ResetWeaponsList(){
        //save bullets remaining in previous weapon
        currentWeap.bulletsInMyChamber = play.bulletsLeft;

        currentWeap = weaponList[currentWeaponIndex];


        play.bulletMaxCapacity = currentWeap.clipSize;
        play.bulletsLeft = currentWeap.bulletsInMyChamber;
        RefreshWeaponDisplay();
    }
Esempio n. 2
0
    void LoadWeaponsList() {
        foreach(GameObject g in weaponPrefabList) {
            GameObject weapon = Instantiate(g, gunBackgroundReference.transform);
            weapon.transform.SetSiblingIndex(0);
            weaponList.Add(weapon.GetComponent<WeaponInfoScript>());
            weapon.SetActive(false);
        }

        currentWeap = weaponList[currentWeaponIndex];

        ResetWeaponsList();
    }