I am using the Rect2 type to carve out rooms from my "map" which is just a large array.
I would like to be able to pick out a random wall tile every time I create a new room.
Before the actual spot is selected I have my map generator pick a random direction to go in (up down left or right) and based on this direction i pick a random wall tile to create a door from. For example, if the random direction is "UP" I would pick a random tile from the top wall of the previous room/Rect2 (which is stored in an array called "rooms").
Is there any way to do this using the Rect2 type?