Out of laziness only public will be listed. Sorry! code should be pretty readable if you need to know the private stuff.
Generates a map using from gameobjects with a Room component.
public int minRooms| field The minimum amount of roomspublic int maxRooms| field The maximum amount of roomspublic List<Room> spawnedRooms| property | public get, private set A List of all the room it spawnedpublic System.Random rng| property | public get, private set The Random class that was used. If you're randomizing inside your room, you should use this Random class that way if you need to regenerate the same map the outcome will be the same.public int seed| property | public get, private set The last seed used for the Random. You can access this value incase you need to save it if you need to return to this random map. Ex; going back a previous map.
public void Generate()Generates a map using a random seedpublic void Generate(int newSeed)Generates a map using the seed passed in
public Bounds bounds| property | public get, private set The bounds of the room. Used for collision testing when trying to place a roompublic RoomSpawn[] spawns| property | public get, private set A List of spawns. (I see no reason for this to be used other then for the MapGenerator)public List<RoomSpawn> openSpawns| property | public get, private set A List of spawns that haven't spawned. (I see no reason for this to be used other then for the MapGenerator)public Dictionary<Dir, List<RoomSpawn>> sortedSpawns| property | public get, private set A Dictionary of the spawns sorted by their Dir. (I see no reason for this to be used other then for the MapGenerator)public List<Room> connections| property | public get, private set A List of the rooms this room is connected topublic int distanceFromHome| field The number of rooms this room is away from the start room.
All these public methods should only be used from MapGenerator. I see no reason for them to be used otherwise.
public void Init()Initializes properties.public void CloseSpawn(RoomSpawn spawn, Room connection)Closes a spawn and sets it's connection.public void AddConnection(Room room)Adds a room it connected topublic bool HasExit(Dir dir)Checks if it has a spawn for the passed Dir
public bool spawned| property | public get, private set return true if this spawn was already spawnedpublic Room connectedTo| property | public get, private set returns theRoomits connected to
All these public methods should only be used from Room. I see no reason for them to be used otherwise.
public void Clear()Resets thespawnedandconnectedtopropertiespublic void Connect(Room room)Connects this spawn