@Override
	public void update(GameContainer container, StateBasedGame game, int delta)
			throws SlickException {

		timer -= delta;
		
		Input input = container.getInput();
		TowerGame tg = (TowerGame) game;
		
		if (input.isKeyPressed(Input.KEY_SPACE) || input.isKeyPressed(Input.KEY_ENTER) || timer <= 0) {
			tg.enterState(TowerGame.MENUSTATE, new FadeOutTransition(), new FadeInTransition());
			//tg.enterState(TowerGame.PLAYINGSTATE, new FadeOutTransition(), new FadeInTransition());
		}
	}