public void update(Graphics g) {
if (offScreenImage == null) {
offScreenImage = this.createImage(800, 600);
}
Graphics gOffScrenn = offScreenImage.getGraphics();
Color c = gOffScrenn.getColor();
gOffScrenn.setColor(Color.green);
gOffScrenn.fillRect(0, 0, Game_WIDTH, Game_HEIGHT);
paint(gOffScrenn);
g.drawImage(offScreenImage, 0, 0, null);
} |
|