@Override
	public void update(GameContainer gc, StateBasedGame sbg, int delta)
			throws SlickException {
		Input input = gc.getInput();

		if (input.isKeyPressed(Input.KEY_1)) {
			debug = !debug;
		}

		if (input.isKeyDown(Input.KEY_W)
				&& Math.abs(body1.getVelocity().getY()) < 1) {
			body1.addForce(new Vector2f(0, -80000));
		} else if (input.isKeyDown(Input.KEY_A)) {
			body1.addForce(new Vector2f(-10000, 0));
			mario.moveLeft(delta, true);

		} else if (input.isKeyDown(Input.KEY_D)) {
			body1.addForce(new Vector2f(10000, 0));
			mario.moveRight(delta, true);

		} else if (input.isKeyPressed(Input.KEY_SPACE)) {
			spawnBullet(bulletList, gc);

		} else {
			mario.stopMoving();
		}

		world.step();
	}