public void Pause(bool pause, bool playSfx) { if (playSfx) { gameAudioManager.PlayMainButtonClick(); } if (statsList != null) { StringBuilder builder = new StringBuilder(); statsList.ForEach(stats => { string statsForPrint = stats.GetStatsForPrint(); builder.Append(statsForPrint); Debug.Log(statsForPrint); } ); ShowStatsContainer(true); } else { resumeStats_txt.text = "Resume"; Time.timeScale = pause ? 0f : 1f; ShowPauseContainer(pause); if (pause) { gameAudioManager.FadeOutBackgroundMusic(); } else { gameAudioManager.FadeInBackgroundMusic(); } } }