@Override
	public void update(GameContainer container, StateBasedGame sbg, int delta) throws SlickException {
		xpos=container.getInput().getMouseX();
		ypos=container.getInput().getMouseY();
		bonusButton.update(delta);
		updateEntities(delta);
		
		if(time > 0){
			time -= delta*1/1000f;
			if(time%10 == 0){
				count -= 1;
			}
		}
		else{
			time = 0;	
		}
		if(time == 0){
			enterEndState(sbg);
		}	
	}