Beispiel #1
0
    public bool TryAttackCoords(Vector2Int newPlayerCoords)
    {
        if (!CurrentAttack.Ready)
        {
            _battleEvents.SendAttemptedAttackOnCooldown(_owner);
            return(false);
        }

        var targets = CurrentAttack.FindTargetsAtCoords(_owner, newPlayerCoords);

        if (targets.Count > 0)
        {
            PrepareAttack(targets);
            var defeated = StartAttack();
            return(defeated.IsSupersetOf(targets));
        }
        return(false);
    }