Мой алгоритм генерирует этот комплекс соединенных комнат.
Код: Выделить всё
public class Room
{
private Room top = null; //Connected rooms
private Room right = null;
private Room bottom = null;
private Room left = null;
private Vector2 roomOffset; //Position of the room
}
Подробнее здесь: https://stackoverflow.com/questions/268 ... f-2d-rooms
Мобильная версия