public void Resume()
 {
     paused = false;
     pauseMenu.SetActive(false);
     Time.timeScale = 1f;
     PauseToggle?.Invoke(false);
 }
 void OnPause(InputValue value)
 {
     paused = !paused;
     PauseToggle?.Invoke(paused);
     pauseMenu.SetActive(paused);
     if (paused)
     {
         Time.timeScale = 0f;
     }
     else
     {
         Time.timeScale = 1f;
     }
 }