1. 플레이어가 벽에 가려지면 카메라 앞으로 이동

CameraController.cs

CameraController.cs

Raycast로 “Block”이라는 레이어마스크를 가진 벽 뒤에 있을 시 카메라 앞으로 이동

2.커서 변경

CursorController.cs

CursorController.cs

Monster라는 레이어를 가진 개체에 마우스를 올리면 커서 변경

3.몬스터 AI

MonsterController.cs

MonsterController.cs

플레이어를 감지하면 State.Moving으로 변경되고

MonsterController.cs

MonsterController.cs

NavMeshAgent를 이용해 인공지능 부여하여 플레이어를 쫒아감

4.레벨업

Stat.cs(몬스터가 지니고 있는 스탯 스크립트)

Stat.cs(몬스터가 지니고 있는 스탯 스크립트)

플레이어에게 죽으면 플레이어에게 경험치 지급

PlayerStat.cs(플레이어가 지니고 있는 스탯 스크립트)

PlayerStat.cs(플레이어가 지니고 있는 스탯 스크립트)

일정 경험치를 모으면 레벨업!

5.몬스터 자동생성

SpawningPool.cs

SpawningPool.cs

몬스터를 OnSpawnEvent로 몬스터 수를 추가하고 코루틴을 시작하고

GameManager.cs

GameManager.cs