public void OnPause() { Debug.Log("PauseManager.OnPause"); isPaused = true; gcSurvival.GamePaused = true; if (gcSurvival.Score != 0) { PlayerPrefs.SetInt("GamePaused", 1); } foreach (AudioSource audio in audios) { audio.enabled = false; } foreach (var pausableComponent in pausableInterfaces) { IPausable pausableInterface = (IPausable)pausableComponent; if (pausableInterface != null) { pausableInterface.OnPause(); } btnAudio.Play(); } }
public void OnPause() { Debug.Log("PauseManager.OnPause"); isPaused = true; foreach (var pausableComponent in pausableInterfaces) { IPausable pausableInterface = (IPausable)pausableComponent; if (pausableInterface != null) { pausableInterface.OnPause(); } } }