private void Update() { if (Input.GetKeyDown(KeyCode.Escape)) { if (!IsAnyPanelActive()) { BackgroundAudio.PlayButtonSound(); PauseGame(); } else { BackgroundAudio.PlayButtonNegativeSound(); SetPanelToPassive(); } } }