Example #1
0
    private void Spawn()
    {
        if (m_BaseRoom == null)
        {
            return;
        }

        if (m_BaseRoom.GetCurrentCapacity() < MaxRoomCapacity)
        {
            Transform newPerson = Instantiate(PrefabPersonToSpawn);
            newPerson.position = m_BaseRoom.GetRandomPoint();
        }

        InvokeNextSpawn();
    }