protected override void Begin() { base.Begin(); this.SinceStarted = TimeSpan.Zero; this.PlayerManager.LookingDirection = HorizontalDirection.Left; this.SinceRisen = TimeSpan.Zero; this.Phase = GateWarp.Phases.Rise; foreach (SoundEmitter soundEmitter in this.SoundManager.Emitters) { soundEmitter.FadeOutAndDie(2f); } this.SoundManager.FadeFrequencies(true, 2f); this.SoundManager.FadeVolume(this.SoundManager.MusicVolumeFactor, 0.0f, 3f); SoundEffectExtensions.EmitAt(this.WarpSound, this.PlayerManager.Position); this.rgbPlanes = (Mesh)null; this.particles = (PlaneParticleSystem)null; this.sinceInitialized = 0.0f; this.originalCenter = this.CameraManager.Center; this.CameraManager.Constrained = true; this.GateAo = Enumerable.FirstOrDefault <ArtObjectInstance>((IEnumerable <ArtObjectInstance>) this.LevelManager.ArtObjects.Values, (Func <ArtObjectInstance, bool>)(x => x.ArtObject.ActorType == ActorType.WarpGate)); if (this.GateAo == null || this.GameState.SaveData.UnlockedWarpDestinations.Count <= 1) { return; } this.InitializeRgbGate(); }
private void DoLoad(bool dummy) { this.LevelManager.ChangeLevel(this.PlayerManager.WarpPanel.Destination); this.Phase = GateWarp.Phases.FadeIn; this.GameState.SaveData.View = this.PlayerManager.OriginWarpViewpoint; this.GameState.SaveData.Ground = Enumerable.First <ArtObjectInstance>((IEnumerable <ArtObjectInstance>) this.LevelManager.ArtObjects.Values, (Func <ArtObjectInstance, bool>)(x => x.ArtObject.ActorType == ActorType.WarpGate)).Position - Vector3.UnitY + FezMath.AsVector(FezMath.VisibleOrientation(this.GameState.SaveData.View)) * 2f; this.PlayerManager.CheckpointGround = (TrileInstance)null; this.PlayerManager.RespawnAtCheckpoint(); this.CameraManager.Center = this.PlayerManager.Position + Vector3.Up * this.PlayerManager.Size.Y / 2f + Vector3.UnitY; this.CameraManager.SnapInterpolation(); this.LevelMaterializer.CullInstances(); this.PlayerManager.Hidden = false; this.GameState.ScheduleLoadEnd = true; this.SinceStarted = TimeSpan.Zero; this.PlayerManager.WarpPanel = (WarpPanel)null; this.particles = (PlaneParticleSystem)null; }
private void DoLoad(bool dummy) { this.LevelManager.ChangeLevel(this.PlayerManager.WarpPanel.Destination); this.Phase = GateWarp.Phases.FadeIn; this.GameState.SaveData.View = this.PlayerManager.OriginWarpViewpoint; this.GameState.SaveData.Ground = Enumerable.First<ArtObjectInstance>((IEnumerable<ArtObjectInstance>) this.LevelManager.ArtObjects.Values, (Func<ArtObjectInstance, bool>) (x => x.ArtObject.ActorType == ActorType.WarpGate)).Position - Vector3.UnitY + FezMath.AsVector(FezMath.VisibleOrientation(this.GameState.SaveData.View)) * 2f; this.PlayerManager.CheckpointGround = (TrileInstance) null; this.PlayerManager.RespawnAtCheckpoint(); this.CameraManager.Center = this.PlayerManager.Position + Vector3.Up * this.PlayerManager.Size.Y / 2f + Vector3.UnitY; this.CameraManager.SnapInterpolation(); this.LevelMaterializer.CullInstances(); this.PlayerManager.Hidden = false; this.GameState.ScheduleLoadEnd = true; this.SinceStarted = TimeSpan.Zero; this.PlayerManager.WarpPanel = (WarpPanel) null; this.particles = (PlaneParticleSystem) null; }
protected override void Begin() { base.Begin(); this.SinceStarted = TimeSpan.Zero; this.PlayerManager.LookingDirection = HorizontalDirection.Left; this.SinceRisen = TimeSpan.Zero; this.Phase = GateWarp.Phases.Rise; foreach (SoundEmitter soundEmitter in this.SoundManager.Emitters) soundEmitter.FadeOutAndDie(2f); this.SoundManager.FadeFrequencies(true, 2f); this.SoundManager.FadeVolume(this.SoundManager.MusicVolumeFactor, 0.0f, 3f); SoundEffectExtensions.EmitAt(this.WarpSound, this.PlayerManager.Position); this.rgbPlanes = (Mesh) null; this.particles = (PlaneParticleSystem) null; this.sinceInitialized = 0.0f; this.originalCenter = this.CameraManager.Center; this.CameraManager.Constrained = true; this.GateAo = Enumerable.FirstOrDefault<ArtObjectInstance>((IEnumerable<ArtObjectInstance>) this.LevelManager.ArtObjects.Values, (Func<ArtObjectInstance, bool>) (x => x.ArtObject.ActorType == ActorType.WarpGate)); if (this.GateAo == null || this.GameState.SaveData.UnlockedWarpDestinations.Count <= 1) return; this.InitializeRgbGate(); }