public void StartTransition() { ServiceHelper.AddComponent((IGameComponent)(this.Transition = new RainHost.RainTransition(this.Game, this.RainPS))); this.PlaneSystems.Remove(this.RainPS, false); this.RainPS.SetViewProjectionSticky(true); this.transitionCenter = this.CameraManager.Center; }
public override void Update(GameTime gameTime) { if (this.GameState.Loading) { return; } if (this.Transition != null) { if (!this.GameState.FarawaySettings.InTransition) { this.RainPS = this.Transition.RainPS; this.PlaneSystems.Add(this.RainPS); this.RainPS.MoveActiveParticles(this.transitionCenter - this.CameraManager.Center); this.RainPS.SetViewProjectionSticky(false); ServiceHelper.RemoveComponent <RainHost.RainTransition>(this.Transition); this.Transition = (RainHost.RainTransition)null; } else { if (this.GameState.Paused || (double)this.GameState.FarawaySettings.DestinationCrossfadeStep <= 0.0) { return; } this.SpawnSplashes(); return; } } Vector3 center = this.CameraManager.Center; int num = 60; Vector3 vector3 = new Vector3((float)num, (float)num / this.CameraManager.AspectRatio, (float)num) / 2f; this.RainPS.Settings.SpawnVolume = new BoundingBox() { Min = center - vector3 * FezMath.XZMask, Max = center + vector3 * new Vector3(1f, 2f, 1f) }; if (this.GameState.Paused || !this.CameraManager.ActionRunning || (this.GameState.InMenuCube || this.GameState.InMap) || this.GameState.InFpsMode) { return; } this.SpawnSplashes(); }
public void StartTransition() { ServiceHelper.AddComponent((IGameComponent) (this.Transition = new RainHost.RainTransition(this.Game, this.RainPS))); this.PlaneSystems.Remove(this.RainPS, false); this.RainPS.SetViewProjectionSticky(true); this.transitionCenter = this.CameraManager.Center; }
public override void Update(GameTime gameTime) { if (this.GameState.Loading) return; if (this.Transition != null) { if (!this.GameState.FarawaySettings.InTransition) { this.RainPS = this.Transition.RainPS; this.PlaneSystems.Add(this.RainPS); this.RainPS.MoveActiveParticles(this.transitionCenter - this.CameraManager.Center); this.RainPS.SetViewProjectionSticky(false); ServiceHelper.RemoveComponent<RainHost.RainTransition>(this.Transition); this.Transition = (RainHost.RainTransition) null; } else { if (this.GameState.Paused || (double) this.GameState.FarawaySettings.DestinationCrossfadeStep <= 0.0) return; this.SpawnSplashes(); return; } } Vector3 center = this.CameraManager.Center; int num = 60; Vector3 vector3 = new Vector3((float) num, (float) num / this.CameraManager.AspectRatio, (float) num) / 2f; this.RainPS.Settings.SpawnVolume = new BoundingBox() { Min = center - vector3 * FezMath.XZMask, Max = center + vector3 * new Vector3(1f, 2f, 1f) }; if (this.GameState.Paused || !this.CameraManager.ActionRunning || (this.GameState.InMenuCube || this.GameState.InMap) || this.GameState.InFpsMode) return; this.SpawnSplashes(); }