public static void Update(){
		room.Update();
		
		boolean change_room = false;
		//OFFSCREEN LEFT
		if (room.player.x+room.player.rb/2 < 0){ 
			change_room = true;
			room.player.x = room.MAP_WIDTH*Tile.WIDTH - 16;
			
			int x = (int)coordinates.getX();
			x--; if (x < 0) x = world_width-1;
			coordinates.setLocation(x, coordinates.getY());
		}
		//OFFSCREEN RIGHT
		else if (room.player.x+room.player.rb/2 >= room.MAP_WIDTH*Tile.WIDTH){
			change_room = true;
			room.player.x = 0; 
					
			int x = (int)coordinates.getX();
			x++; if (x >= world_width) x = 0;
			coordinates.setLocation(x, coordinates.getY());
		}
		//OFFSCREEN TOP
		else if (room.player.y+room.player.bb/2 < 0){
			change_room = true;
			room.player.y = room.MAP_HEIGHT*Tile.HEIGHT - 16;
			
			int y = (int)coordinates.getY();
			y--; if (y < 0) y = world_height-1;
			coordinates.setLocation(coordinates.getX(), y);
		}
		//OFFSCREEN BOTTOM
		else if (room.player.y+room.player.bb/2 >= room.MAP_HEIGHT*Tile.HEIGHT){
			change_room = true;
			room.player.y = 0;
			
			int y = (int)coordinates.getY();
			y++; if (y >= world_height) y = 0;
			coordinates.setLocation(coordinates.getX(), y);
		}
		
		if (change_room){
			Player player = room.player;
			room = rooms.get((int)coordinates.getY()).get((int)coordinates.getX());
			room.player.facing = player.facing;
			room.player.whatdidisay = player.whatdidisay;
			room.player.voice = player.voice;
			room.player.x = player.x;
			room.player.y = player.y;
			room.player.Update(room);
		}
	}