void Start() { connectingDirections = new List<Direction>(); connectingRooms = new List<RoomSpace>(); finishedRooms = new List<RoomSpace>(); //startRoom.connectingDoor = Direction.North; currentRoom = startRoom; noRoomSpaces = false; roomCount = 0; ManageRooms(); }
void ManageRooms() { CreateNewRoom(); while(!noRoomSpaces) { if (roomCount == connectingRooms.Count) { noRoomSpaces = true; break; } currentRoom = connectingRooms[roomCount]; if (finishedRooms.Contains(currentRoom)) { roomCount++; continue; } else { CreateNewRoom(); roomCount++; } } }