public void StopWipe() { if (!base.IsRendering()) { return; } Service.ViewTimeEngine.UnregisterFrameTimeObserver(this); this.wipeTime = 0f; this.continueWipeRequested = false; this.takingSnapshot = false; bool flag = this.transition == WipeTransition.FromBaseToBase; base.RestoreCameras(this.srcCameras, flag, false); this.srcCameras.Clear(); base.RestoreCameras(this.dstCameras, true, flag); this.dstCameras.Clear(); base.DestroyRenderObjects(); Service.UserInputManager.Enable(true); if (this.completeCallback != null) { WipeCompleteDelegate wipeCompleteDelegate = this.completeCallback; object cookie = this.completeCookie; this.completeCallback = null; this.completeCookie = null; wipeCompleteDelegate(cookie); } }
protected void OnTransitionVisualsLoaded(object cookie) { bool flag = (bool)cookie; WipeCompleteDelegate completeCallback; if (flag) { completeCallback = new WipeCompleteDelegate(this.OnSoftWipeComplete); } else { completeCallback = new WipeCompleteDelegate(this.OnTransitionOutComplete); } Service.Get <CameraManager>().WipeCamera.StartLinearWipe(this.startWipeTransition, this.wipeDirection, completeCallback, null); }
private void StartWipe(string shaderName, WipeTransition transition, float wipeAngle, float centerX, float centerY, WipeCompleteDelegate completeCallback, object completeCookie) { if (base.IsRendering()) { this.StopWipe(); } this.completeCallback = completeCallback; this.completeCookie = completeCookie; this.transition = transition; Service.UserInputManager.Enable(false); switch (transition) { case WipeTransition.FromIntroToBase: this.SetupWipeFromIntroToBase(); break; case WipeTransition.FromBaseToBase: this.SetupWipeFromBaseToBase(); break; case WipeTransition.FromStoryToLoadingScreen: this.SetupWipeFromStoryToLoadingScreen(); break; case WipeTransition.FromLoadingScreenToBase: this.SetupWipeFromLoadingScreenToBase(); break; case WipeTransition.FromGalaxyToHyperspace: this.SetupWipeFromGalaxyToHyperspace(); break; case WipeTransition.FromHyperspaceToBase: this.SetupWipeFromHyperspaceToBase(); break; case WipeTransition.FromBaseToGalaxy: this.SetupWipeFromBaseToGalaxy(); break; case WipeTransition.FromGalaxyToBase: this.SetupWipeFromGalaxyToBase(); break; case WipeTransition.FromGalaxyToLoadingScreen: this.SetupWipeFromGalaxyToLoadingScreen(); break; case WipeTransition.FromLoadingScreenToWarboard: this.SetupWipeFromLoadingScreenToWarboard(); break; case WipeTransition.FromWarboardToLoadingScreen: this.SetupWipeFromWarboardToLoadingScreen(); break; case WipeTransition.FromBaseToWarboard: this.SetupWipeFromBaseToWarboard(); break; case WipeTransition.FromWarboardToBase: this.SetupWipeFromWarboardToBase(); break; } if (this.srcCameras.Count > 0) { this.srcRenderTexture = base.PrepareCameras(this.srcCameras); } if (this.dstCameras.Count > 0) { this.dstRenderTexture = base.PrepareCameras(this.dstCameras); } base.CreateMaterial(shaderName); base.StartRendering(true); this.quadMaterial.SetTexture("_from", this.srcRenderTexture); this.quadMaterial.SetTexture("_to", this.dstRenderTexture); this.quadMaterial.SetFloat("_thickness", 0.1f); float num = Mathf.Cos(wipeAngle); float num2 = Mathf.Sin(wipeAngle); float num3 = Mathf.Abs(num) + Mathf.Abs(num2); this.quadMaterial.SetFloat("_cos_sum", num / num3); this.quadMaterial.SetFloat("_sin_sum", num2 / num3); this.quadMaterial.SetFloat("_xedge", (num >= 0f) ? 0f : 1f); this.quadMaterial.SetFloat("_yedge", (num2 >= 0f) ? 0f : 1f); this.quadMaterial.SetFloat("_cx", centerX); this.quadMaterial.SetFloat("_cy", centerY); this.quadMaterial.SetFloat("_aspect", (float)Screen.width / (float)Screen.height); this.wipeTime = 0f; this.OnViewFrameTime(0f); Service.ViewTimeEngine.RegisterFrameTimeObserver(this); }
public void StartEllipticalWipe(WipeTransition transition, float centerX, float centerY, WipeCompleteDelegate completeCallback, object completeCookie) { this.StartWipe("Wipe_Elliptical", transition, 0f, centerX, centerY, completeCallback, completeCookie); }
public void StartLinearWipe(WipeTransition transition, float wipeAngle, WipeCompleteDelegate completeCallback, object completeCookie) { this.StartWipe("Wipe_Linear", transition, wipeAngle, 0f, 0f, completeCallback, completeCookie); }
public void TakeSnapshotForDelayedWipe(WipeTransition transition, float wipeAngle, WipeCompleteDelegate completeCallback, object completeCookie) { this.StartLinearWipe(transition, wipeAngle, completeCallback, null); this.takingSnapshot = true; this.snapshotFramesToWait = 4; }