From 7e4194be49427044c6a04fac9a2600e5cbd19fc9 Mon Sep 17 00:00:00 2001 From: LeeJaeHyun Date: Thu, 12 Sep 2024 16:46:01 +0900 Subject: [PATCH] . --- Assets/02_Scripts/MonsterController.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Assets/02_Scripts/MonsterController.cs b/Assets/02_Scripts/MonsterController.cs index ea871c6..88839d9 100644 --- a/Assets/02_Scripts/MonsterController.cs +++ b/Assets/02_Scripts/MonsterController.cs @@ -25,8 +25,10 @@ public class MonsterController : MonoBehaviour { playerTr = GameObject.Find("Player").GetComponent(); monsterTr = transform; + agent = GetComponent(); StartCoroutine(CheckMonsterState()); + StartCoroutine(MonsterAction()); } IEnumerator CheckMonsterState() @@ -63,6 +65,9 @@ public class MonsterController : MonoBehaviour break; case State.TRACE: + // 좔적 μ‹œμž‘ + agent.SetDestination(playerTr.position); + agent.isStopped = false; break; case State.ATTACK: