public bool BackPageTo(string contextName) { if (this._pageContextStack.Count <= 0) { SuperDebug.VeryImportantError("The page stack is empty!!!"); return(false); } if (contextName != "MainPageContext") { bool flag = false; foreach (BasePageContext context in this._pageContextStack) { if (context.config.contextName == contextName) { flag = true; break; } } if (!flag) { SuperDebug.VeryImportantError("Can't find page in stack: " + contextName); return(false); } } this.spaceShipVisibleOnPreviesPage = this._pageContextStack.Peek().spaceShipVisible(); while ((this._pageContextStack.Count > 0) && (this._pageContextStack.Peek().config.contextName != contextName)) { this._pageContextStack.Pop().Destroy(); } if (this._pageContextStack.Count > 0) { BasePageContext context4 = this._pageContextStack.Peek(); if (context4.view != null) { context4.SetActive(true); context4.OnLandedFromBackPage(); } else { context4.StartUp(this.SceneCanvas.transform, null); } } else { this._pageContextStackStash.Clear(); this._emtryPageContext.Destroy(); this.ShowPage(new MainPageContext(), UIType.Page); } return(true); }
private void OnVideoFinished() { try { this.AudioVolumeParamSetting(3f); this.DisableVideo(); Screen.sleepTimeout = -2; } catch (Exception exception) { SuperDebug.VeryImportantError(exception.ToString()); } finally { this.StartFirstLevel(); } }
private void OnVideoReady() { try { this.AudioVolumeParamSetting(0f); Singleton <WwiseAudioManager> .Instance.Post("GameEntry_Elevator_End", null, null, null); this._videoPlayer.Play(); Singleton <MainUIManager> .Instance.LockUI(true, float.MaxValue); Screen.sleepTimeout = -1; } catch (Exception exception) { SuperDebug.VeryImportantError(exception.ToString()); this.OnVideoFinished(); } }