示例#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);
        }
示例#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);
        }
示例#3
0
 public SubroomConnection(PathBlockType block, RoomSubsection sub)
 {
     issue    = block;
     nextRoom = sub;
 }
示例#4
0
 private bool HasOtherPath(RoomSubsection subRoom)
 {
     return(subRoom.doorWays.Count > 2 || subRoom.connections.Count > 0);
 }
示例#5
0
 private void GeneratePath(RoomSubsection subSection, bool canBeReentered, bool hasOtherPath)
 {
 }