public void drawHero(int cx, int cy, Graphics g, String dir) {
		int xi = 0, xf = 0, yi = 0, yf = 0;

		if (dir.equals("down")) {
			yi = 0;
			yf = 40;

		} else if (dir.equals("up")) {
			yi = 80;
			yf = 120;

		} else if (dir.equals("right")) {
			yi = 120;
			yf = 160;

		} else if (dir.equals("left")) {
			yi = 40;
			yf = 80;

		}

		if (frame % 5 == 0) {
			xi = 0;
			xf = 40;

		}

		else if (frame % 5 == 1) {
			xi = 40;
			xf = 80;

		} else if (frame % 5 == 2) {
			xi = 80;
			xf = 120;

		} else if (frame % 5 == 3) {
			xi = 120;
			xf = 160;

		} else if (frame % 5 == 4) {
			xi = 160;
			xf = 200;

		}
		g.drawImage(hero, stx + cx, sty + cy - (sqSize / 2), stx + cx + sqSize,
				sty + cy + sqSize - (sqSize / 2), xi, yi, xf, yf, null);

	}