protected IEnumerator Wandering() { yield return(new WaitForSeconds(Random.Range(2.0f, 4.0f))); // 목적지(빈 타일) 찾기. //destinationTileForMove = habitat.FindBlanks(1)[0]; if (canWander) { // WARNING 이거 부하 있을 수 있음. destinationTileForMove = habitat.FindNearestBlank(curTileForMove); if (destinationTileForMove == null) { curState = State.Wandering; yield break; } destinationTile = destinationTileForMove.GetParent(); curState = State.PathFinding; } else { curState = State.Idle; } }