Example #1
0
    void Attack()
    {
        bool attacked = attackComponent.Attack("Attack");

        if (attacked)
        {
            target.AddDamage(autoAttackDamage);
            Debug.Log("attacked!");
        }
    }
Example #2
0
 private void Attack()
 {
     if (isAttacking)
     {
         bool attackEnd = attackComponent.Attack("Attack1");
         if (attackEnd)
         {
             attackComponent.AttackMotionEnd("Attack1");
             weapon.enabled = false;
             isAttacking    = false;
             comboCount     = 0;
         }
         else
         {
             if (input.HasAttackInput() && comboCount < 4)
             {
                 attackComponent.AttackAndIntervalReset("Attack1");
                 weapon.enabled = true;
                 comboCount++;
             }
         }
     }
 }