@Override
	public void update() {
		int xa = 0;
		int ya = 0;

		if (input.up.isPressed()) {
			ya--;
		}
		if (input.down.isPressed()) {
			ya++;
		}
		if (input.left.isPressed()) {
			xa--;
		}
		if (input.right.isPressed()) {
			xa++;
		}

		if (xa != 0 || ya != 0) {
			move(xa, ya);
			isMoving = true;
		} else {
			isMoving = false;
		}

		if (level.getTile(this.x >> 4, this.y >> 4).getId() == 9) {
			isSwimming = true;
		}
		if (isSwimming && level.getTile(this.x >> 4, this.y >> 4).getId() != 9) {
			isSwimming = false;
		}
		updateCount++;
	}