private void FightClosestTarget() { TargetableByAI closestTarget = AI_Controller.Instance.GetClosestTarget(transform.position); if (closestTarget != null) { charController.Command_Attack(closestTarget.GetComponent <Alive>()); } }
public void SetTarget(Alive target) { if (selectedCharacter != null) { selectedCharacter.Command_Attack(target); target.SendMessage("OnTargeted", SendMessageOptions.DontRequireReceiver); currentlyTargetedChar = true; } }
void OnGotHit(Fighter attacker) { Alive attackersAlive = attacker.GetComponent <Alive>(); if (!charController.CommandIssued && !attackersAlive.IsDead) { charController.Command_Attack(attackersAlive); } }