public virtual void DisableCurrentWeapon() { if (weaponScripts.Count == 0) { return; } TEMPWeapon = (BaseWeaponScript)weaponScripts[selectedWeaponSlot]; TEMPWeapon.Disable(); TEMPgameObject = (GameObject)weaponSlots[selectedWeaponSlot]; TEMPgameObject.SetActive(false); }
public virtual void DisableCurrentWeapon() { if (weaponScripts.Count == 0) { return; } // grab reference to currently selected weapon script TEMPWeapon = (BaseWeaponScript)weaponScripts [selectedWeaponSlot]; // now tell the script to disable itself TEMPWeapon.Disable(); // grab reference to the weapon's gameObject and disable that, too TEMPgameObject = (GameObject)weaponSlots [selectedWeaponSlot]; TEMPgameObject.SetActive(false); }
public virtual void DisableCurrentWeapon() { if (_weaponsScript.Count == 0) { return; } // Grab reference to currently selected weapon script _tmpWeapon = (BaseWeaponScript)_weaponsScript[SelectedWeaponSlot]; // now tell the script to disable itself _tmpWeapon.Disable(); // Grab reference to the weapon's gameObject and disable the, too _tmpGameObject = (GameObject)_weaponsSlots[SelectedWeaponSlot]; _tmpGameObject.SetActive(false); }