public override void Initialize() { base.Initialize(); this.PlayerManager.Hidden = true; this.PlayerManager.CanControl = false; this.GameState.FarawaySettings.InTransition = true; this.StartVolume = this.LevelManager.Volumes[this.PlayerManager.DoorVolume.Value]; if (this.StartVolume.ActorSettings == null) { this.StartVolume.ActorSettings = new VolumeActorSettings(); } float viewScale = SettingsManager.GetViewScale(this.GraphicsDevice); this.OriginalRadius = this.CameraManager.Radius; this.GameState.FarawaySettings.DestinationRadius = this.DestinationRadius = (double)this.StartVolume.ActorSettings.DestinationRadius == 0.0 ? this.CameraManager.Radius : this.StartVolume.ActorSettings.DestinationRadius * viewScale; this.GameState.FarawaySettings.DestinationPixelsPerTrixel = this.StartVolume.ActorSettings.DestinationPixelsPerTrixel; this.GameState.FarawaySettings.SkyRt = this.SkyRt.Target; this.NextLevel = this.PlayerManager.NextLevel; this.LevelRt = this.TargetRenderer.TakeTarget(); ServiceHelper.AddComponent((IGameComponent)(this.Fader = new FarawayTransition.LevelFader(this.Game, this.SkyRt, this.LevelRt))); this.TargetRenderer.ScheduleHook(this.Fader.DrawOrder, this.LevelRt.Target); if (this.StartVolume.ActorSettings.WaterLocked) { LiquidHost.Instance.StartTransition(); } if (this.LevelManager.Rainy && RainHost.Instance != null) { RainHost.Instance.StartTransition(); } if (this.StartVolume.ActorSettings.DestinationSong != this.LevelManager.SongName) { this.SoundManager.PlayNewSong((string)null, 10f); } foreach (SoundEmitter soundEmitter in this.SoundManager.Emitters) { soundEmitter.FadeOutAndDie(1f, false); } SoundEffectExtensions.Emit(this.CMProvider.Global.Load <SoundEffect>("Sounds/Intro/ZoomToFarawayPlace")).Persistent = true; this.DotManager.ForceDrawOrder(1001); this.DotManager.Burrow(); }
public override void Initialize() { base.Initialize(); this.PlayerManager.Hidden = true; this.PlayerManager.CanControl = false; this.GameState.FarawaySettings.InTransition = true; this.StartVolume = this.LevelManager.Volumes[this.PlayerManager.DoorVolume.Value]; if (this.StartVolume.ActorSettings == null) this.StartVolume.ActorSettings = new VolumeActorSettings(); float viewScale = SettingsManager.GetViewScale(this.GraphicsDevice); this.OriginalRadius = this.CameraManager.Radius; this.GameState.FarawaySettings.DestinationRadius = this.DestinationRadius = (double) this.StartVolume.ActorSettings.DestinationRadius == 0.0 ? this.CameraManager.Radius : this.StartVolume.ActorSettings.DestinationRadius * viewScale; this.GameState.FarawaySettings.DestinationPixelsPerTrixel = this.StartVolume.ActorSettings.DestinationPixelsPerTrixel; this.GameState.FarawaySettings.SkyRt = this.SkyRt.Target; this.NextLevel = this.PlayerManager.NextLevel; this.LevelRt = this.TargetRenderer.TakeTarget(); ServiceHelper.AddComponent((IGameComponent) (this.Fader = new FarawayTransition.LevelFader(this.Game, this.SkyRt, this.LevelRt))); this.TargetRenderer.ScheduleHook(this.Fader.DrawOrder, this.LevelRt.Target); if (this.StartVolume.ActorSettings.WaterLocked) LiquidHost.Instance.StartTransition(); if (this.LevelManager.Rainy && RainHost.Instance != null) RainHost.Instance.StartTransition(); if (this.StartVolume.ActorSettings.DestinationSong != this.LevelManager.SongName) this.SoundManager.PlayNewSong((string) null, 10f); foreach (SoundEmitter soundEmitter in this.SoundManager.Emitters) soundEmitter.FadeOutAndDie(1f, false); SoundEffectExtensions.Emit(this.CMProvider.Global.Load<SoundEffect>("Sounds/Intro/ZoomToFarawayPlace")).Persistent = true; this.DotManager.ForceDrawOrder(1001); this.DotManager.Burrow(); }