private bool RegionOverlapsRoom(int x, int y, int h, int w,
    MapRoom room)
 {
     if (room.bounds.x + room.bounds.w < x) return false;
     if (x + w < room.bounds.x) return false;
     if (room.bounds.y + room.bounds.h < y) return false;
     if (y + h < room.bounds.y) return false;
     return true;
 }
Example #2
0
 public MapRoomDoor(int side, int offset, MapRoom parent)
 {
     this.side = side;
     this.offset = offset;
     this.parent = parent;
 }