public void update() {
		List<Entity> es = level.getEntities(this, 20);
		System.out.println(es.size());
		for (Entity e : es) {
			System.out.println(e);
		}
		if (walking)
			animSprite.update();
		else
			animSprite.setFrame(0);
		if (fireRate > 0)
			fireRate--;
		int xa = 0, ya = 0;

		if (input.up) {
			animSprite = up;
			ya -= 2;
		}
		if (input.down) {
			animSprite = down;
			ya += 2;
		}
		if (input.left) {
			animSprite = left;
			xa -= 2;
		}
		if (input.right) {
			animSprite = right;
			xa += 2;
		}
		if (xa != 0 || ya != 0) {
			move(xa, ya);
			walking = true;
		} else {
			walking = false;
		}
		clear();
		updateShooting();

	}