private void Awake()
        {
            roomGen     = GetComponent <RoomGenerator>();
            graphGen    = GetComponent <GraphGenerator>();
            corridorGen = GetComponent <CorridorGenerator>();
            spawnPlayer = GetComponent <SpawnPlayer>();

            if (autoBuildAtStart)
            {
                Generate();
            }
        }
Пример #2
0
 protected override void StartGenerate()
 {
     m_roomGenerator = new RoomGenerator(m_mapSize, m_totalRoomCount, m_selectRoomCount, m_minRoomSize, m_maxRoomSize);
     m_roadGenerator = new CorridorGenerator(m_mapSize, m_roomGenerator.SelectRooms);
     GenerateObjects(m_roomGenerator.SelectRooms, m_roadGenerator.Corridors);
 }