.
This commit is contained in:
parent
1c6282b65a
commit
7e4194be49
@ -25,8 +25,10 @@ public class MonsterController : MonoBehaviour
|
||||
{
|
||||
playerTr = GameObject.Find("Player").GetComponent<Transform>();
|
||||
monsterTr = transform;
|
||||
agent = GetComponent<NavMeshAgent>();
|
||||
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user