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

		for (Iterator<Enemy> iterator = mobs.iterator(); iterator.hasNext(); ) {
			Enemy e = iterator.next();
			e.update(delta);
		}
		
		// check collisions
		checkCollisions();
		
		if(input.isKeyPressed(Input.KEY_F5)){
			init(gc, sbg);
		}
		
		if(level != -1)
			timer -= delta;
		
		// timer runs out
		if(timer < -2){
			Sounds.die.play();
			level--;
			initLevel();
		}
		
		if(gameOver && theendTimer < 9000){
			theendTimer += delta;
		}
		
		particles.update(delta);
		
		if(input.isKeyPressed(Input.KEY_ENTER)){
			initLevel();
		}
	}