public override void Attack(GameObject target) { currentTarget = target; if (!target) { return; } if (TargetIsInRange()) { targetDamagable = currentTarget.GetComponent <HealthBehaviour>(); InCombat = true; MakeAttack(); } else { _encounteredTarget = false; _movement.Chase(target); } }
public override void Attack(GameObject guard) { currentTarget = guard; movement.Chase(guard); targetDamagable = currentTarget.GetComponent <HealthBehaviour>(); }