Beispiel #1
0
        private bool CanBeEntered(RoomSubsection subRoom)
        {
            bool canBeEntered = false;

            if (subRoom.doorWays.Count > 1)
            {
                ;
            }

            if (!canBeEntered && subRoom.connections.Count > 0)
            {
                foreach (RoomSubsection sub in subRoom.parentRoom.subrooms)
                {
                    if (sub == subRoom)
                    {
                        continue;
                    }

                    foreach (SubroomConnection con in sub.connections)
                    {
                        if (con.nextRoom == subRoom)
                        {
                            return(true);
                        }
                    }
                }
            }

            return(false);
        }
Beispiel #2
0
        public void GeneratePath(ref Random rng)
        {
            RoomSubsection subRoom = rooms[0].subrooms[0]; // Get start subroom

            bool canBeEntered = CanBeEntered(subRoom), hasOtherPath = HasOtherPath(subRoom);

            GeneratePath(subRoom, canBeEntered, hasOtherPath);
        }
Beispiel #3
0
 public SubroomConnection(PathBlockType block, RoomSubsection sub)
 {
     issue    = block;
     nextRoom = sub;
 }
Beispiel #4
0
 private bool HasOtherPath(RoomSubsection subRoom)
 {
     return(subRoom.doorWays.Count > 2 || subRoom.connections.Count > 0);
 }
Beispiel #5
0
 private void GeneratePath(RoomSubsection subSection, bool canBeReentered, bool hasOtherPath)
 {
 }