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