Exemplo n.º 1
0
 public override bool PerformAttack(Vector3 target, AttackType attackType)
 {
     if (attackType == AttackType.Melee)
     {
         return(melee.ExecuteAttack(target));
     }
     else
     {
         return(ranged.ExecuteAttack(target));
     }
 }
Exemplo n.º 2
0
    public override bool PerformAttack(Vector3 target, AttackType attackType)
    {
        if (attackType == AttackType.Melee)
        {
            melee.ExecuteAttack(target); return(true);
        }

        else if (attackType == AttackType.Ranged)
        {
            ranged.ExecuteAttack(target); return(true);
        }

        else if (attackType == AttackType.Thrown)
        {
            thrown.ExecuteAttack(target); return(true);
        }

        else
        {
            return(false);
        }
    }