public virtual void EnableCurrentWeapon()
 {
     if (weaponScripts.Count == 0)
     {
         return;
     }
     TEMPWeapon = (BaseWeaponScript)weaponScripts[selectedWeaponSlot];
     TEMPWeapon.Enable();
     TEMPgameObject = (GameObject)weaponSlots[selectedWeaponSlot];
     TEMPgameObject.SetActive(true);
 }
Esempio n. 2
0
    public virtual void EnableCurrentWeapon()
    {
        if (weaponScripts.Count == 0)
        {
            return;
        }

        // grab reference to currently selected weapon
        TEMPWeapon = (BaseWeaponScript)weaponScripts [selectedWeaponSlot];

        // now tell the script to enable itself
        TEMPWeapon.Enable();

        TEMPgameObject = (GameObject)weaponSlots [selectedWeaponSlot];
        TEMPgameObject.SetActive(true);
    }
Esempio n. 3
0
    public virtual void EnableCurrentWeapon()
    {
        if (_weaponsScript.Count == 0)
        {
            return;
        }

        // Grab refrence to currently selected weapon
        _tmpWeapon = (BaseWeaponScript)_weaponsScript[SelectedWeaponSlot];

        // Now tell the script to enable itselft
        _tmpWeapon.Enable();

        _tmpGameObject = (GameObject)_weaponsSlots[SelectedWeaponSlot];

        _tmpGameObject.SetActive(false);
    }