private void Attack()
 {
     if (Preoccupied)
     {
         return;
     }
     AttackPressed.Invoke();
     _attackComboIndex++;
     if (_attackComboIndex >= attackCombo.Length)
     {
         _attackComboIndex = 0;
     }
 }
Exemplo n.º 2
0
    public void OnAttack(InputAction.CallbackContext context)
    {
        if (context.started)
        {
            AttackHeld = true;
            AttackPressed?.Invoke();
        }

        else if (context.canceled)
        {
            AttackHeld = false;
            AttackReleased?.Invoke();
        }
    }