void AttackOpponent(AIBehaviour opponent) { if (target == null || isAttacking) { return; } if (!IsCloseEnough(target.transform.position, 0.8f)) { return; } transform.LookAt(target.transform.position); anim.SetTrigger(Hash.Attack); opponent.GetHit(this, damagePower); }