private void render(){
		BufferStrategy bs = getBufferStrategy();
		if(bs == null){
			createBufferStrategy(3);
			return;
		}
		
		render.clear();
		if(state == 0) render.render(menu);
		if(state == 1){
			render.render(level);
			render.renderUnit(u);
		}
		
		for(int i = 0; i < pixels.length; i++){
			pixels[i] = render.pixels[i];
		}
		Graphics g = bs.getDrawGraphics();
		windowWidth = getWidth();
		windowHeight = getHeight();
		g.drawImage(image, 0, 0, windowWidth, windowHeight, null);
		g.dispose();
		bs.show();
	}