Ejemplo n.º 1
0
 public void DoPause()
 {
     isPaused = true;
     //Set time.timescale to 0, this will cause animations and physics to stop updating
     Time.timeScale  = 0;
     allAudioSources = FindObjectsOfType(typeof(AudioSource)) as AudioSource[];
     foreach (AudioSource sound in allAudioSources)
     {
         sound.Pause();
     }
     showPanels.Show(pausePanel);
 }