private void updatePause(){
    if(!paused){
      for(int i = 0 ; i < players.length ; ++i){
        if(players[i].physics.playerControl.isPaused()){
          soundPlayer.sfxPause();
          pausePlayer = i;
          paused = true;
          world.addDrawable(pauseDisplay, 3);
          pauseState = 0;
          break;
        }
      }
    }
    else{
      if(pauseState == 0){
        //Pause has been pressed but never released
        if(!players[pausePlayer].physics.playerControl.isPaused()){
          pauseState = 1;
        }
      }
      else if(pauseState == 1){
        //Fully paused. Waiting for unpause to be pushed
        if(players[pausePlayer].physics.playerControl.isPaused()){
          pauseState = 2;
        }
      }
      else if(pauseState == 2){
        //Unpaused pushed but must be released before end of pause
        if(!players[pausePlayer].physics.playerControl.isPaused()){
          soundPlayer.sfxPause();
          pauseState = 0;
          paused = false;
        }
      }
    }
  }