Esempio n. 1
0
 public void activateWeaponAttack(HAND hand, bool state)
 {
     if (hand == HAND.left)
     {
         leftHand.ActivateAttack(state);
     }
     else if (hand == HAND.right)
     {
         rightHand.ActivateAttack(state);
     }
     else
     {
         leftHand.ActivateAttack(state);
         rightHand.ActivateAttack(state);
     }
 }
Esempio n. 2
0
    public void ActivateWeapon()
    {
        Weapon weapon = GameManager.Inventory.CurrentWeapon;

        if (weapon == null)
        {
            Debug.LogWarning("ActivateWeapon() called with no weapon found!");
            return;
        }

        weapon.ActivateAttack();
        GameManager.Inventory.TryRemoveAmmo(weapon.Type, 1);
    }