public override void OnAdd()
 {
     Program.game.xRenderMaster.xDistortions = new RenderMaster.DistortionControl(Program.game.GraphicsDevice);
     Program.game.xRenderMaster.xDistortions.fDistortGrade = this.fStartDistortion;
     Program.game.xRenderMaster.xDistortions.bEffectOn = true;
     OverlayRenderComponent all = new OverlayRenderComponent(new Rectangle(0, 0, 640, 360), Color.Black);
     Program.game.xRenderMaster.xDistortions.lxAreasOfHaze.Add(all);
 }
 public override void OnAdd()
 {
     this.xDarkness = new OverlayRenderComponent(new Rectangle(0, 0, 640, 360), Color.Black);
     this.xDarkness.fAlpha = 0f;
     Program.game.xRenderMaster.RegisterAboveAllRenderComponent(this.xDarkness);
     this.xCrystalBotLeft = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(74f, 418f), SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Crystal)) as SortedAnimated);
     this.xCrystalBotRight = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(572f, 418f), SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Crystal)) as SortedAnimated);
     this.xCrystalTopLeft = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(134f, 335f), SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Crystal)) as SortedAnimated);
     this.xCrystalTopRight = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(512f, 335f), SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Crystal)) as SortedAnimated);
     if (Program.game.xGameSessionData.henActiveFlags.Contains(FlagCodex.FlagID._MainStory_FlyingTemple_StartedGeneratorA))
     {
         (this.xCrystalBotLeft.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(2, Animation.CancelOptions.IgnoreIfPlaying);
         (this.xCrystalBotRight.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(2, Animation.CancelOptions.IgnoreIfPlaying);
         this.xBigScreenEffect = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(282f, 547f), SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_BigScreen)) as SortedAnimated);
         (this.xBigScreenEffect.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
         this.xEmblemEffect = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(305f, 503f), SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Emblem)) as SortedAnimated);
         (this.xEmblemEffect.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
         this.xKeyboardEffect = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(294f, 589f), SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Keyboard)) as SortedAnimated);
         (this.xKeyboardEffect.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
         this.xLeftScreenEffect = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(231f, 546f), SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_LeftScreen)) as SortedAnimated);
         (this.xLeftScreenEffect.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
         this.xRightScreenEffect = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(390f, 546f), SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_RightScreen)) as SortedAnimated);
         (this.xRightScreenEffect.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
         this.xTopLeftPower = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(221f, 497f), SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Powerlines)) as SortedAnimated);
         (this.xTopLeftPower.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(4, Animation.CancelOptions.IgnoreIfPlaying);
         this.xTopRightPower = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(324f, 497f), SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Powerlines)) as SortedAnimated);
         (this.xTopRightPower.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(5, Animation.CancelOptions.RestartIfPlaying);
         this.xBotLeftPower = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(171f, 525f), SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Powerlines)) as SortedAnimated);
         (this.xBotLeftPower.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(6, Animation.CancelOptions.RestartIfPlaying);
         this.xBotRightPower = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(429f, 525f), SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Powerlines)) as SortedAnimated);
         (this.xBotRightPower.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(7, Animation.CancelOptions.RestartIfPlaying);
         this.xTopLeftPower.xRenderComponent.fVirtualHeight = 70f;
         this.xTopRightPower.xRenderComponent.fVirtualHeight = 70f;
         this.xLockLightBot = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(315f, 188f), SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Keyhole)) as SortedAnimated);
         (this.xLockLightBot.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(1, Animation.CancelOptions.RestartIfPlaying);
         this.xFirstGlow = (Program.game._EffectMaster_AddEffect(new _Effect_GlowTrailAfterglow(Program.game.xLevelMaster.contRegionContent.Load<Texture2D>("Bkg/Zone009_FlyingTemple/Inside/GeneratorEffects/floorlights_generator1"), new Vector2(0f, 400f), new Color(58, 251, 103), 0.1f, 1, 2)) as _Effect_GlowTrailAfterglow);
     }
     if (Program.game.xGameSessionData.henActiveFlags.Contains(FlagCodex.FlagID._MainStory_FlyingTemple_StartedGeneratorB))
     {
         (this.xCrystalTopLeft.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(2, Animation.CancelOptions.IgnoreIfPlaying);
         (this.xCrystalTopRight.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(2, Animation.CancelOptions.IgnoreIfPlaying);
         (this.xCrystalBotLeft.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(4, Animation.CancelOptions.IgnoreIfPlaying);
         (this.xCrystalBotRight.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(4, Animation.CancelOptions.IgnoreIfPlaying);
         this.xBigScreenEffect = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(282f, 547f) - this.p + this.v2StartOfSecondGenerator, SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_BigScreen)) as SortedAnimated);
         (this.xBigScreenEffect.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
         this.xEmblemEffect = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(305f, 503f) - this.p + this.v2StartOfSecondGenerator, SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Emblem)) as SortedAnimated);
         (this.xEmblemEffect.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
         this.xKeyboardEffect = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(294f, 589f) - this.p + this.v2StartOfSecondGenerator, SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Keyboard)) as SortedAnimated);
         (this.xKeyboardEffect.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
         this.xLeftScreenEffect = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(231f, 546f) - this.p + this.v2StartOfSecondGenerator, SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_LeftScreen)) as SortedAnimated);
         (this.xLeftScreenEffect.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
         this.xRightScreenEffect = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(390f, 546f) - this.p + this.v2StartOfSecondGenerator, SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_RightScreen)) as SortedAnimated);
         (this.xRightScreenEffect.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
         this.xTopLeftPower = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(221f, 497f) - this.p + this.v2StartOfSecondGenerator, SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Powerlines)) as SortedAnimated);
         (this.xTopLeftPower.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(4, Animation.CancelOptions.IgnoreIfPlaying);
         this.xTopRightPower = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(324f, 497f) - this.p + this.v2StartOfSecondGenerator, SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Powerlines)) as SortedAnimated);
         (this.xTopRightPower.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(5, Animation.CancelOptions.RestartIfPlaying);
         this.xBotLeftPower = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(171f, 525f) - this.p + this.v2StartOfSecondGenerator, SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Powerlines)) as SortedAnimated);
         (this.xBotLeftPower.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(6, Animation.CancelOptions.RestartIfPlaying);
         this.xBotRightPower = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(429f, 525f) - this.p + this.v2StartOfSecondGenerator, SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Powerlines)) as SortedAnimated);
         (this.xBotRightPower.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(7, Animation.CancelOptions.RestartIfPlaying);
         this.xTopLeftPower.xRenderComponent.fVirtualHeight = 70f;
         this.xTopRightPower.xRenderComponent.fVirtualHeight = 70f;
         this.xLockLightMid = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(315f, 162f), SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Keyhole)) as SortedAnimated);
         (this.xLockLightMid.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(1, Animation.CancelOptions.RestartIfPlaying);
         this.xSecondGlow_Right = (Program.game._EffectMaster_AddEffect(new _Effect_GlowTrailAfterglow(Program.game.xLevelMaster.contRegionContent.Load<Texture2D>("Bkg/Zone009_FlyingTemple/Inside/Unique/lighttrails_rightgenerator_floor"), new Vector2(10101f, 132f), new Color(58, 251, 103), 0.1f, 1, 2)) as _Effect_GlowTrailAfterglow);
         this.xSecondGlow = (Program.game._EffectMaster_AddEffect(new _Effect_GlowTrailAfterglow(Program.game.xLevelMaster.contRegionContent.Load<Texture2D>("Bkg/Zone009_FlyingTemple/Inside/GeneratorEffects/floorlights_generator2a"), new Vector2(15f, 325f), new Color(58, 251, 103), 0.1f, 1, 2)) as _Effect_GlowTrailAfterglow);
         this.xSecondGlow = (Program.game._EffectMaster_AddEffect(new _Effect_GlowTrailAfterglow(Program.game.xLevelMaster.contRegionContent.Load<Texture2D>("Bkg/Zone009_FlyingTemple/Inside/GeneratorEffects/floorlights_generator2b"), new Vector2(15f, 325f), new Color(58, 251, 103), 0.1f, 1, 2)) as _Effect_GlowTrailAfterglow);
         Program.game._EffectMaster_AddEffect(new _Effect_GlowTrail(Program.game.xLevelMaster.contRegionContent.Load<Texture2D>("Bkg/Zone009_FlyingTemple/Inside/Unique/lighttrails_rightgenerator_wall"), new Vector2(10103f, 22f), new Color(191, 255, 241), 0.09f, 4, 400));
     }
     if (Program.game.xGameSessionData.henActiveFlags.Contains(FlagCodex.FlagID._MainStory_FlyingTemple_StartedGeneratorC))
     {
         (this.xCrystalTopLeft.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(4, Animation.CancelOptions.IgnoreIfPlaying);
         (this.xCrystalTopRight.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(4, Animation.CancelOptions.IgnoreIfPlaying);
         (this.xCrystalBotLeft.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(4, Animation.CancelOptions.IgnoreIfPlaying);
         (this.xCrystalBotRight.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(4, Animation.CancelOptions.IgnoreIfPlaying);
         this.xBigScreenEffect = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(282f, 547f) - this.p + this.v2StartOfThirdGenerator, SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_BigScreen)) as SortedAnimated);
         (this.xBigScreenEffect.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
         this.xEmblemEffect = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(305f, 503f) - this.p + this.v2StartOfThirdGenerator, SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Emblem)) as SortedAnimated);
         (this.xEmblemEffect.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
         this.xKeyboardEffect = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(294f, 589f) - this.p + this.v2StartOfThirdGenerator, SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Keyboard)) as SortedAnimated);
         (this.xKeyboardEffect.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
         this.xLeftScreenEffect = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(231f, 546f) - this.p + this.v2StartOfThirdGenerator, SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_LeftScreen)) as SortedAnimated);
         (this.xLeftScreenEffect.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
         this.xRightScreenEffect = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(390f, 546f) - this.p + this.v2StartOfThirdGenerator, SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_RightScreen)) as SortedAnimated);
         (this.xRightScreenEffect.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
         this.xTopLeftPower = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(221f, 497f) - this.p + this.v2StartOfThirdGenerator, SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Powerlines)) as SortedAnimated);
         (this.xTopLeftPower.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(4, Animation.CancelOptions.IgnoreIfPlaying);
         this.xTopRightPower = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(324f, 497f) - this.p + this.v2StartOfThirdGenerator, SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Powerlines)) as SortedAnimated);
         (this.xTopRightPower.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(5, Animation.CancelOptions.RestartIfPlaying);
         this.xBotLeftPower = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(171f, 525f) - this.p + this.v2StartOfThirdGenerator, SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Powerlines)) as SortedAnimated);
         (this.xBotLeftPower.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(6, Animation.CancelOptions.RestartIfPlaying);
         this.xBotRightPower = (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(429f, 525f) - this.p + this.v2StartOfThirdGenerator, SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_Powerlines)) as SortedAnimated);
         (this.xBotRightPower.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(7, Animation.CancelOptions.RestartIfPlaying);
         this.xTopLeftPower.xRenderComponent.fVirtualHeight = 70f;
         this.xTopRightPower.xRenderComponent.fVirtualHeight = 70f;
         this.xSecondGlow_Right = (Program.game._EffectMaster_AddEffect(new _Effect_GlowTrailAfterglow(Program.game.xLevelMaster.contRegionContent.Load<Texture2D>("Bkg/Zone009_FlyingTemple/Inside/Unique/lighttrails_leftgenerator_floor"), new Vector2(20113f, 151f), new Color(58, 251, 103), 0.1f, 1, 2)) as _Effect_GlowTrailAfterglow);
         this.xSecondGlow = (Program.game._EffectMaster_AddEffect(new _Effect_GlowTrailAfterglow(Program.game.xLevelMaster.contRegionContent.Load<Texture2D>("Bkg/Zone009_FlyingTemple/Inside/GeneratorEffects/floorlights_generator3a"), new Vector2(22f, 334f), new Color(58, 251, 103), 0.1f, 1, 2)) as _Effect_GlowTrailAfterglow);
         this.xSecondGlow = (Program.game._EffectMaster_AddEffect(new _Effect_GlowTrailAfterglow(Program.game.xLevelMaster.contRegionContent.Load<Texture2D>("Bkg/Zone009_FlyingTemple/Inside/GeneratorEffects/floorlights_generator3b"), new Vector2(145f, 253f), new Color(58, 251, 103), 0.1f, 1, 2)) as _Effect_GlowTrailAfterglow);
         Program.game._EffectMaster_AddEffect(new _Effect_GlowTrail(Program.game.xLevelMaster.contRegionContent.Load<Texture2D>("Bkg/Zone009_FlyingTemple/Inside/Unique/lighttrails_leftgenerator_wall"), new Vector2(20113f, 84f), new Color(191, 255, 241), 0.09f, 4, 400));
         (Program.game._EffectMaster_AddEffect(new SortedAnimated(new Vector2(253f, 114f), SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_GeneratorEffects_BossGate)).xRenderComponent as AnimatedRenderComponent).SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
         Program.game._EffectMaster_AddEffect(new _Effect_GlowTrail(Program.game.xLevelMaster.contRegionContent.Load<Texture2D>("Bkg/Zone009_FlyingTemple/Inside/Unique/lighttrails_maingeneratorwall"), new Vector2(22f, 62f), new Color(191, 255, 241), 0.14f, 3, 300));
     }
 }