public synchronized void updateMap(){ updated.set( 0, 0, mapWidth, mapHeight ); fullUpdate = true; }
public static void updateMap() { if (scene != null) { scene.tiles.updated.set(0, 0, Level.WIDTH, Level.HEIGHT); } }
public synchronized void updateMap(){ updated.set( 0, 0, mapWidth, mapHeight ); fullUpdate = true; }
public Rect setPos( int x, int y ) { return set( x, y, x + (right - left), y + (bottom - top)); }
public Rect set( Rect rect ) { return set( rect.left, rect.top, rect.right, rect.bottom ); }
public Rect shift( int x, int y ) { return set( left+x, top+y, right+x, bottom+y ); }
public Rect resize( int w, int h ){ return set( left, top, left+w, top+h); }
public Rect setPos( int x, int y ) { return set( x, y, x + (right - left), y + (bottom - top)); }
public Rect shift( int x, int y ) { return set( left+x, top+y, right+x, bottom+y ); }
public Rect set( Rect rect ) { return set( rect.left, rect.top, rect.right, rect.bottom ); }
public Rect set( Rect rect ) { return set( rect.left, rect.top, rect.right, rect.bottom ); }
public Rect resize( int w, int h ){ return set( left, top, left+w, top+h); }
public Room set( Room other ) { super.set( other ); for (Room r : other.neigbours){ neigbours.add(r); r.neigbours.remove(other); r.neigbours.add(this); } for (Room r : other.connected.keySet()){ Door d = other.connected.get(r); r.connected.remove(other); r.connected.put(this, d); connected.put(r, d); } return this; }
public void map( int[] data, int cols ) { this.data = data; mapWidth = cols; mapHeight = data.length / cols; size = mapWidth * mapHeight; width = cellW * mapWidth; height = cellH * mapHeight; quads = Quad.createSet( size ); updated.set( 0, 0, mapWidth, mapHeight ); }
public Room set( Room other ) { super.set( other ); for (Room r : other.neigbours){ neigbours.add(r); r.neigbours.remove(other); r.neigbours.add(this); } for (Room r : other.connected.keySet()){ Door d = other.connected.get(r); r.connected.remove(other); r.connected.put(this, d); connected.put(r, d); } return this; }
public Rect union( int x, int y ) { if (isEmpty()) { return set( x, y, x + 1, y + 1 ); } else { if (x < left) { left = x; } else if (x >= right) { right = x + 1; } if (y < top) { top = y; } else if (y >= bottom) { bottom = y + 1; } return this; } }
public Rect union( int x, int y ) { if (isEmpty()) { return set( x, y, x + 1, y + 1 ); } else { if (x < left) { left = x; } else if (x >= right) { right = x + 1; } if (y < top) { top = y; } else if (y >= bottom) { bottom = y + 1; } return this; } }
public Rect union( int x, int y ) { if (isEmpty()) { return set( x, y, x + 1, y + 1 ); } else { if (x < left) { left = x; } else if (x >= right) { right = x + 1; } if (y < top) { top = y; } else if (y >= bottom) { bottom = y + 1; } return this; } }
space.set( Random.IntRange(2, 6), Random.IntRange(2, 6),
space.set( Random.IntRange(2, 6), Random.IntRange(2, 6),