Example #1
0
        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();
        }
Example #2
0
        void ManageRooms()
        {
            CreateNewRoom();

            while(!noRoomSpaces)
            {
                if (roomCount == connectingRooms.Count)
                {
                    noRoomSpaces = true;
                    break;
                }

                currentRoom = connectingRooms[roomCount];

                if (finishedRooms.Contains(currentRoom))
                {
                    roomCount++;
                    continue;
                }
                else
                {
                    CreateNewRoom();
                    roomCount++;
                }
            }
        }