@Override
	public void paint(Graphics g) {
		if (state == GameState.Running) {
			g.drawImage(background, bg1.getBgX(), bg1.getBgY(), this);
			g.drawImage(background, bg2.getBgX(), bg2.getBgY(), this);
			paintTiles(g);

			ArrayList<Projectile> projectiles = robot.getProjectiles();
			for (int i = 0; i < projectiles.size(); i++) {
				Projectile p = (Projectile) projectiles.get(i);
				g.setColor(Color.YELLOW);
				g.fillRect(p.getX(), p.getY(), 10, 5);
			}
			// g.drawRect((int) robot.rect.getX(), (int) robot.rect.getY(),
			// (int) robot.rect.getWidth(), (int) robot.rect.getHeight());
			// g.drawRect((int) robot.rect2.getX(), (int) robot.rect2.getY(),
			// (int) robot.rect2.getWidth(), (int) robot.rect2.getHeight());
			// g.drawRect((int) robot.rect3.getX(), (int) robot.rect3.getY(),
			// (int) robot.rect3.getWidth(), (int) robot.rect3.getHeight());
			// g.drawRect((int) robot.yellowRed.getX(), (int)
			// robot.yellowRed.getY(),
			// (int) robot.yellowRed.getWidth(), (int)
			// robot.yellowRed.getHeight());
			g.drawImage(currentSprite, robot.getCenterX() - 61,
					robot.getCenterY() - 63, this);
			g.drawImage(hanim.getImage(), hb.getCenterX() - 48,
					hb.getCenterY() - 48, this);
			g.drawImage(hanim.getImage(), hb2.getCenterX() - 48,
					hb2.getCenterY() - 48, this);
			g.setFont(font);
			g.setColor(Color.WHITE);
			g.drawString(Integer.toString(score), 740, 30);
		} else if (state == GameState.Dead){
			g.setColor(Color.BLACK);
			g.fillRect(0,0,800,480);
			g.setColor(Color.WHITE);
			g.drawString("Dead", 360, 240);
		}

	}