void EquipSpell(int index) { DeactivateSpells(); canFire = true; activeSpell = spells[index]; activeSpell.Equip(); spells[index].gameObject.SetActive(true); }
void Equip(int index) { DeactivateWeapons(); canFire = true; activeWeapon = weapons[index]; activeWeapon.Equip(); weapons[index].gameObject.SetActive(true); }
void EquipWeapon(int index) { DeactivateWeapons(); activeWeapon = weapons[index]; canFire = true; activeWeapon.gameObject.SetActive(true); activeWeapon.Equip(); OnWeaponSwitch?.Invoke(activeWeapon); }
void Equip(int index) { DeactivateWeapons(); canFire = true; activeWeapon = weapons[index]; activeWeapon.Equip(); weapons[index].gameObject.SetActive(true); if (OnWeaponSwitch != null) { OnWeaponSwitch(activeWeapon); } }
internal void EquipWeapon(int index) { DeactivateWeapons(); m_ActiveWeapon = weapons [index]; m_ActiveWeapon.Equip(); weapons [index].gameObject.SetActive(true); CanFire = true; if (OnWeaponSwitched != null) { OnWeaponSwitched(m_ActiveWeapon); } }
void Equip(int index) { // Deactivate all the weapons for momenteraly after default weapon chosen DeactiveWeapons(); canFire = true; // activate default weapon gameObject activeWeapon = weapons[index]; activeWeapon.Equip(); weapons[index].gameObject.SetActive(true); if (onWeaponSwitch != null) { onWeaponSwitch(activeWeapon); } }
internal void Equip(int indexOfWeapon) { DeactivateWeapons(); CanFire = true; indexOfWeapon = CheckInactive(indexOfWeapon); m_ActiveWeapon = weapons[indexOfWeapon]; m_ActiveWeapon.Equip(); weapons[indexOfWeapon].gameObject.SetActive(true); weapons[indexOfWeapon].GetComponent <WeaponReloader>().WeaponImage.GetComponent <Image>().enabled = true; weapons[indexOfWeapon].GetComponent <WeaponReloader>().BulletImage.GetComponent <Image>().enabled = true; weaponSwitch.Play(); if (OnWeaponSwitch != null) { OnWeaponSwitch(m_ActiveWeapon); } }
public void Equip(Shooter shooter) { currentWeapon = shooter; shooter.isLocalPlayer = true; shooter.Equip(); }