@Override
	public void paint(Graphics g) {
		// 建立临时的缓冲图片
		BufferedImage image = new BufferedImage(WIDTH, HEIGHT,
				BufferedImage.TYPE_3BYTE_BGR);
		Graphics g2 = image.getGraphics();

		if (this.isStart) {

			// 绘制背景
			g2.drawImage(currBg.getBgImage(), 0, 0, this);

			g2.drawString("生命：" + mario.getLife(), 700, 100);

			// 绘制敌人（如果把绘制敌人的代码放”绘制障碍物”后面，食人花就会出现在水管的外面）
			Iterator<Enemy> iterEnemy = currBg.getEnemies().iterator();
			while (iterEnemy.hasNext()) {
				Enemy e = iterEnemy.next();
				g2.drawImage(e.getShowImage(), e.getX(), e.getY(), this);
			}

			// 绘制障碍物
			Iterator<Obstacle> iter = currBg.getObstacles().iterator();
			while (iter.hasNext()) {
				Obstacle ob = iter.next();
				g2.drawImage(ob.getShowImage(), ob.getX(), ob.getY(), this);
			}

			g2.drawImage(mario.getShowImage(), mario.getX(), mario.getY(), this);

		} else {
			g2.drawImage(ResLoader.startImage, 0, 0, this);
		}

		// 把缓冲图片绘制到窗体中
		g.drawImage(image, 0, 0, this);

	}