Beispiel #1
0
 public void OnPickUp()
 {
     OnWeaponSwitch?.Invoke(isGun);
     if (weaponAnim != null)
     {
         weaponAnim.SetTrigger("Pickup");
     }
 }
Beispiel #2
0
 protected virtual void OnEnable()
 {
     if (bulletsLeft <= 0 && isGun)
     {
         Reload();
     }
     OnWeaponSwitch?.Invoke(isGun);
 }
 void EquipWeapon(int index)
 {
     DeactivateWeapons();
     activeWeapon = weapons[index];
     canFire      = true;
     activeWeapon.gameObject.SetActive(true);
     activeWeapon.Equip();
     OnWeaponSwitch?.Invoke(activeWeapon);
 }
 /// <summary>
 /// Called on pointer up from weapon button in weapon selection menu
 /// </summary>
 public void SelectWeapon(WeaponIndex w)
 {
     OnWeaponSwitch?.Invoke(w);
 }