@Override
    public void update(GameContainer gc, StateBasedGame game, int delta) throws SlickException {
		super.update(gc, game, delta);
        player.update(gc, game, delta);
        map.update(gc, game, delta);
        if(gc.getInput().isKeyPressed(Input.KEY_D)) {
            if(((Game) game).isDebug()) ((Game) game).setDebug(false);
            else ((Game) game).setDebug(true);
        } else if(gc.getInput().isKeyPressed(Input.KEY_ESCAPE)) {
            game.enterState(Game.PAUSE_STATE_ID, new FadeOutTransition(), new FadeInTransition());
        }
    }