Exemple #1
0
 private void TryInitialize()
 {
   this.RainPS = (PlaneParticleSystem) null;
   this.ePreThunder = (SoundEmitter) null;
   if (this.lightning != null)
     this.lightning.Dispose();
   this.lightning = (Mesh) null;
   this.trileTops = (TrileInstance[]) null;
   this.Visible = this.Enabled = this.LevelManager.Rainy;
   if (!this.Enabled)
     return;
   this.doThunder = this.LevelManager.Name != "INDUSTRIAL_CITY";
   if (this.Transition == null)
   {
     Vector3 vector3 = this.RainColor.ToVector3();
     PlaneParticleSystemSettings settings = new PlaneParticleSystemSettings();
     settings.Velocity = (VaryingVector3) new Vector3(0.0f, -50f, 0.0f);
     settings.SpawningSpeed = 60f;
     settings.ParticleLifetime = 0.6f;
     settings.SpawnBatchSize = 10;
     PlaneParticleSystemSettings particleSystemSettings1 = settings;
     VaryingVector3 varyingVector3_1 = new VaryingVector3();
     varyingVector3_1.Function = RainHost.RainScaling;
     VaryingVector3 varyingVector3_2 = varyingVector3_1;
     particleSystemSettings1.SizeBirth = varyingVector3_2;
     settings.FadeOutDuration = 0.1f;
     PlaneParticleSystemSettings particleSystemSettings2 = settings;
     VaryingColor varyingColor1 = new VaryingColor();
     varyingColor1.Base = this.RainColor;
     varyingColor1.Variation = new Color(0, 0, 0, 24);
     VaryingColor varyingColor2 = varyingColor1;
     particleSystemSettings2.ColorLife = varyingColor2;
     settings.ColorDeath = (VaryingColor) new Color(vector3.X, vector3.Y, vector3.Z, 0.0f);
     settings.ColorBirth = (VaryingColor) new Color(vector3.X, vector3.Y, vector3.Z, 0.0f);
     settings.Texture = this.CMProvider.Global.Load<Texture2D>("Other Textures/rain/rain");
     settings.BlendingMode = BlendingMode.Alphablending;
     settings.Billboarding = true;
     settings.NoLightDraw = true;
     this.PlaneSystems.Add(this.RainPS = new PlaneParticleSystem(this.Game, 500, settings));
     for (int index = 0; index < 75; ++index)
       this.PlaneSystems.RainSplash(Vector3.Zero).FadeOutAndDie(0.0f);
   }
   ContentManager contentManager = this.LevelManager.Name == null ? this.CMProvider.Global : this.CMProvider.CurrentLevel;
   this.lightning = new Mesh()
   {
     Effect = (BaseEffect) new DefaultEffect.Textured(),
     Texture = (Dirtyable<Texture>) ((Texture) this.CMProvider.Global.Load<Texture2D>("Other Textures/rain/lightning_a"))
   };
   this.lightning.AddFace(Vector3.One * new Vector3(16f, 32f, 16f), Vector3.Zero, FaceOrientation.Front, true, true);
   if (this.lightningSounds == null)
     this.lightningSounds = new SoundEffect[4]
     {
       contentManager.Load<SoundEffect>("Sounds/Graveyard/Thunder1"),
       contentManager.Load<SoundEffect>("Sounds/Graveyard/Thunder2"),
       contentManager.Load<SoundEffect>("Sounds/Graveyard/Thunder3"),
       contentManager.Load<SoundEffect>("Sounds/Graveyard/Thunder4")
     };
   if (this.thunderDistant == null)
     this.thunderDistant = new SoundEffect[3]
     {
       contentManager.Load<SoundEffect>("Sounds/Graveyard/ThunderDistant01"),
       contentManager.Load<SoundEffect>("Sounds/Graveyard/ThunderDistant02"),
       contentManager.Load<SoundEffect>("Sounds/Graveyard/ThunderDistant03")
     };
   if (this.sPreThunder == null)
     this.sPreThunder = contentManager.Load<SoundEffect>("Sounds/Graveyard/ThunderRumble");
   this.trileTops = Enumerable.ToArray<TrileInstance>(Enumerable.Where<TrileInstance>((IEnumerable<TrileInstance>) this.LevelManager.Triles.Values, (Func<TrileInstance, bool>) (x =>
   {
     if (x.Enabled && !x.Trile.Immaterial && !ActorTypeExtensions.IsClimbable(x.Trile.ActorSettings.Type) && (x.Trile.Geometry == null || !x.Trile.Geometry.Empty || x.Trile.Faces[FaceOrientation.Front] != CollisionType.None))
       return this.NoTop(x);
     else
       return false;
   })));
   this.flashIn = TimeSpan.FromSeconds((double) RandomHelper.Between(4.0, 6.0));
   this.distantIn = TimeSpan.FromSeconds((double) RandomHelper.Between(3.0, 6.0));
 }
Exemple #2
0
 private void TryInitialize()
 {
     foreach (WaterfallsHost.WaterfallState waterfallState in this.Waterfalls)
     {
         waterfallState.Dispose();
     }
     this.Waterfalls.Clear();
     foreach (BackgroundPlane plane in Enumerable.ToArray <BackgroundPlane>((IEnumerable <BackgroundPlane>) this.LevelManager.BackgroundPlanes.Values))
     {
         if (plane.ActorType == ActorType.Waterfall || plane.ActorType == ActorType.Trickle)
         {
             Vector3 vector3_1    = Vector3.Transform(plane.Size * plane.Scale * Vector3.UnitX / 2f, plane.Rotation);
             Vector3 vector       = Vector3.Transform(Vector3.UnitZ, plane.Rotation);
             Vector3 vector3_2    = FezMath.XZMask - FezMath.Abs(vector);
             Vector3 vector3_3    = plane.Position + plane.Size * plane.Scale * Vector3.UnitY / 2f - new Vector3(0.0f, 1.0 / 32.0, 0.0f) - vector * 2f / 16f;
             Game    game         = this.Game;
             int     maximumCount = 25;
             PlaneParticleSystemSettings particleSystemSettings1 = new PlaneParticleSystemSettings();
             particleSystemSettings1.SpawnVolume = new BoundingBox()
             {
                 Min = vector3_3 - vector3_1,
                 Max = vector3_3 + vector3_1
             };
             PlaneParticleSystemSettings particleSystemSettings2 = particleSystemSettings1;
             VaryingVector3 varyingVector3_1 = new VaryingVector3();
             varyingVector3_1.Base      = Vector3.Up * 1.6f + vector / 4f;
             varyingVector3_1.Variation = Vector3.Up * 0.8f + vector / 4f + vector3_2 / 2f;
             VaryingVector3 varyingVector3_2 = varyingVector3_1;
             particleSystemSettings2.Velocity           = varyingVector3_2;
             particleSystemSettings1.Gravity            = new Vector3(0.0f, -0.15f, 0.0f);
             particleSystemSettings1.SpawningSpeed      = 5f;
             particleSystemSettings1.RandomizeSpawnTime = true;
             particleSystemSettings1.ParticleLifetime   = 2f;
             particleSystemSettings1.FadeInDuration     = 0.0f;
             particleSystemSettings1.FadeOutDuration    = 0.1f;
             particleSystemSettings1.SizeBirth          = (VaryingVector3) new Vector3(1.0 / 16.0);
             particleSystemSettings1.ColorLife          = (VaryingColor)(this.LevelManager.WaterType == LiquidType.Sewer ? new Color(215, 232, 148) : new Color(1f, 1f, 1f, 0.75f));
             particleSystemSettings1.Texture            = this.CMProvider.Global.Load <Texture2D>("Background Planes/white_square");
             particleSystemSettings1.BlendingMode       = BlendingMode.Alphablending;
             particleSystemSettings1.ClampToTrixels     = true;
             particleSystemSettings1.Billboarding       = true;
             particleSystemSettings1.FullBright         = this.LevelManager.WaterType == LiquidType.Sewer;
             particleSystemSettings1.UseCallback        = true;
             PlaneParticleSystemSettings settings            = particleSystemSettings1;
             PlaneParticleSystem         planeParticleSystem = new PlaneParticleSystem(game, maximumCount, settings);
             if (this.LevelManager.WaterType == LiquidType.Sewer)
             {
                 planeParticleSystem.DrawOrder            = 20;
                 planeParticleSystem.Settings.StencilMask = new StencilMask?(StencilMask.Level);
             }
             this.PlaneParticleSystems.Add(planeParticleSystem);
             this.Waterfalls.Add(new WaterfallsHost.WaterfallState(plane, planeParticleSystem, this));
         }
         else if (plane.ActorType == ActorType.Drips)
         {
             Vector3 vector3_1    = new Vector3(plane.Size.X, 0.0f, plane.Size.X) / 2f;
             Vector3 vector3_2    = Vector3.Transform(Vector3.UnitZ, plane.Rotation);
             Vector3 vector3_3    = FezMath.XZMask - FezMath.Abs(vector3_2);
             Vector3 vector3_4    = plane.Position - new Vector3(0.0f, 0.125f, 0.0f);
             bool    flag         = plane.Crosshatch || plane.Billboard;
             Game    game         = this.Game;
             int     maximumCount = 25;
             PlaneParticleSystemSettings particleSystemSettings1 = new PlaneParticleSystemSettings();
             particleSystemSettings1.SpawnVolume = new BoundingBox()
             {
                 Min = vector3_4 - vector3_1,
                 Max = vector3_4 + vector3_1
             };
             PlaneParticleSystemSettings particleSystemSettings2 = particleSystemSettings1;
             VaryingVector3 varyingVector3_1 = new VaryingVector3();
             varyingVector3_1.Base      = Vector3.Zero;
             varyingVector3_1.Variation = Vector3.Zero;
             VaryingVector3 varyingVector3_2 = varyingVector3_1;
             particleSystemSettings2.Velocity           = varyingVector3_2;
             particleSystemSettings1.Gravity            = new Vector3(0.0f, -0.15f, 0.0f);
             particleSystemSettings1.SpawningSpeed      = 2f;
             particleSystemSettings1.RandomizeSpawnTime = true;
             particleSystemSettings1.ParticleLifetime   = 2f;
             particleSystemSettings1.FadeInDuration     = 0.0f;
             particleSystemSettings1.FadeOutDuration    = 0.0f;
             particleSystemSettings1.SizeBirth          = (VaryingVector3) new Vector3(1.0 / 16.0);
             particleSystemSettings1.ColorLife          = (VaryingColor)(this.LevelManager.WaterType == LiquidType.Sewer ? new Color(215, 232, 148) : Color.White);
             particleSystemSettings1.Texture            = this.CMProvider.Global.Load <Texture2D>("Background Planes/white_square");
             particleSystemSettings1.BlendingMode       = BlendingMode.Alphablending;
             particleSystemSettings1.ClampToTrixels     = true;
             particleSystemSettings1.FullBright         = true;
             PlaneParticleSystemSettings settings = particleSystemSettings1;
             PlaneParticleSystem         system   = new PlaneParticleSystem(game, maximumCount, settings);
             if (this.LevelManager.WaterType == LiquidType.Sewer)
             {
                 system.DrawOrder            = 20;
                 system.Settings.StencilMask = new StencilMask?(StencilMask.Level);
             }
             if (flag)
             {
                 system.Settings.Billboarding = true;
                 system.Settings.SpawnVolume  = new BoundingBox()
                 {
                     Min = vector3_4 - vector3_1,
                     Max = vector3_4 + vector3_1
                 };
             }
             else
             {
                 system.Settings.Doublesided = plane.Doublesided;
                 system.Settings.SpawnVolume = new BoundingBox()
                 {
                     Min = vector3_4 - vector3_1 * vector3_3,
                     Max = vector3_4 + vector3_1 * vector3_3
                 };
                 system.Settings.Orientation = new FaceOrientation?(FezMath.OrientationFromDirection(vector3_2));
             }
             this.PlaneParticleSystems.Add(system);
         }
     }
 }
Exemple #3
0
 private void CreateParticleSystems()
 {
   if (this.LevelManager.WaterType == LiquidType.None)
     return;
   LiquidColorScheme liquidColorScheme = LiquidHost.ColorSchemes[this.LevelManager.WaterType];
   switch (this.LevelManager.WaterType)
   {
     case LiquidType.Lava:
     case LiquidType.Sewer:
       Color color = new Color(liquidColorScheme.SubmergedFoam.ToVector3() * 0.5f);
       PlaneParticleSystemSettings particleSystemSettings1 = new PlaneParticleSystemSettings();
       particleSystemSettings1.Velocity = (VaryingVector3) new Vector3(0.0f, 0.15f, 0.0f);
       particleSystemSettings1.Gravity = new Vector3(0.0f, 0.0f, 0.0f);
       particleSystemSettings1.SpawningSpeed = 50f;
       particleSystemSettings1.ParticleLifetime = 2.2f;
       particleSystemSettings1.SpawnBatchSize = 1;
       PlaneParticleSystemSettings particleSystemSettings2 = particleSystemSettings1;
       VaryingVector3 varyingVector3_1 = new VaryingVector3();
       varyingVector3_1.Base = new Vector3(1.0 / 16.0);
       varyingVector3_1.Variation = new Vector3(1.0 / 16.0);
       varyingVector3_1.Function = VaryingVector3.Uniform;
       VaryingVector3 varyingVector3_2 = varyingVector3_1;
       particleSystemSettings2.SizeBirth = varyingVector3_2;
       PlaneParticleSystemSettings particleSystemSettings3 = particleSystemSettings1;
       VaryingVector3 varyingVector3_3 = new VaryingVector3();
       varyingVector3_3.Base = new Vector3(0.125f);
       varyingVector3_3.Variation = new Vector3(0.125f);
       varyingVector3_3.Function = VaryingVector3.Uniform;
       VaryingVector3 varyingVector3_4 = varyingVector3_3;
       particleSystemSettings3.SizeDeath = varyingVector3_4;
       particleSystemSettings1.FadeInDuration = 0.1f;
       particleSystemSettings1.FadeOutDuration = 0.1f;
       PlaneParticleSystemSettings particleSystemSettings4 = particleSystemSettings1;
       VaryingColor varyingColor1 = new VaryingColor();
       varyingColor1.Base = color;
       varyingColor1.Variation = color;
       varyingColor1.Function = VaryingColor.Uniform;
       VaryingColor varyingColor2 = varyingColor1;
       particleSystemSettings4.ColorLife = varyingColor2;
       particleSystemSettings1.Texture = this.CMProvider.Global.Load<Texture2D>("Background Planes/white_square");
       particleSystemSettings1.BlendingMode = BlendingMode.Alphablending;
       particleSystemSettings1.Billboarding = true;
       PlaneParticleSystemSettings settings1 = particleSystemSettings1;
       IPlaneParticleSystems planeParticleSystems1 = this.PlaneParticleSystems;
       LiquidHost liquidHost1 = this;
       PlaneParticleSystem planeParticleSystem1 = new PlaneParticleSystem(this.Game, 100, settings1);
       planeParticleSystem1.DrawOrder = this.DrawOrder + 1;
       PlaneParticleSystem planeParticleSystem2;
       PlaneParticleSystem planeParticleSystem3 = planeParticleSystem2 = planeParticleSystem1;
       liquidHost1.BubbleSystem = planeParticleSystem2;
       PlaneParticleSystem system1 = planeParticleSystem3;
       planeParticleSystems1.Add(system1);
       if (this.LevelManager.WaterType == LiquidType.Sewer)
         break;
       PlaneParticleSystemSettings particleSystemSettings5 = new PlaneParticleSystemSettings();
       PlaneParticleSystemSettings particleSystemSettings6 = particleSystemSettings5;
       VaryingVector3 varyingVector3_5 = new VaryingVector3();
       varyingVector3_5.Variation = new Vector3(1f);
       VaryingVector3 varyingVector3_6 = varyingVector3_5;
       particleSystemSettings6.Velocity = varyingVector3_6;
       particleSystemSettings5.Gravity = new Vector3(0.0f, 0.01f, 0.0f);
       particleSystemSettings5.SpawningSpeed = 40f;
       particleSystemSettings5.ParticleLifetime = 2f;
       particleSystemSettings5.SpawnBatchSize = 1;
       particleSystemSettings5.RandomizeSpawnTime = true;
       PlaneParticleSystemSettings particleSystemSettings7 = particleSystemSettings5;
       VaryingVector3 varyingVector3_7 = new VaryingVector3();
       varyingVector3_7.Function = LiquidHost.EmberScaling;
       VaryingVector3 varyingVector3_8 = varyingVector3_7;
       particleSystemSettings7.SizeBirth = varyingVector3_8;
       particleSystemSettings5.FadeInDuration = 0.15f;
       particleSystemSettings5.FadeOutDuration = 0.4f;
       particleSystemSettings5.ColorBirth = (VaryingColor) new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0);
       particleSystemSettings5.ColorLife.Base = new Color((int) byte.MaxValue, 16, 16);
       particleSystemSettings5.ColorLife.Variation = new Color(0, 32, 32);
       particleSystemSettings5.ColorLife.Function = VaryingColor.Uniform;
       particleSystemSettings5.ColorDeath = (VaryingColor) new Color(0, 0, 0, 32);
       particleSystemSettings5.Texture = this.CMProvider.Global.Load<Texture2D>("Background Planes/white_square");
       particleSystemSettings5.BlendingMode = BlendingMode.Alphablending;
       particleSystemSettings5.Billboarding = true;
       PlaneParticleSystemSettings settings2 = particleSystemSettings5;
       IPlaneParticleSystems planeParticleSystems2 = this.PlaneParticleSystems;
       LiquidHost liquidHost2 = this;
       PlaneParticleSystem planeParticleSystem4 = new PlaneParticleSystem(this.Game, 50, settings2);
       planeParticleSystem4.DrawOrder = this.DrawOrder + 1;
       PlaneParticleSystem planeParticleSystem5;
       PlaneParticleSystem planeParticleSystem6 = planeParticleSystem5 = planeParticleSystem4;
       liquidHost2.EmbersSystem = planeParticleSystem5;
       PlaneParticleSystem system2 = planeParticleSystem6;
       planeParticleSystems2.Add(system2);
       break;
   }
 }
Exemple #4
0
        private void TryInitialize()
        {
            this.RainPS      = (PlaneParticleSystem)null;
            this.ePreThunder = (SoundEmitter)null;
            if (this.lightning != null)
            {
                this.lightning.Dispose();
            }
            this.lightning = (Mesh)null;
            this.trileTops = (TrileInstance[])null;
            this.Visible   = this.Enabled = this.LevelManager.Rainy;
            if (!this.Enabled)
            {
                return;
            }
            this.doThunder = this.LevelManager.Name != "INDUSTRIAL_CITY";
            if (this.Transition == null)
            {
                Vector3 vector3 = this.RainColor.ToVector3();
                PlaneParticleSystemSettings settings = new PlaneParticleSystemSettings();
                settings.Velocity         = (VaryingVector3) new Vector3(0.0f, -50f, 0.0f);
                settings.SpawningSpeed    = 60f;
                settings.ParticleLifetime = 0.6f;
                settings.SpawnBatchSize   = 10;
                PlaneParticleSystemSettings particleSystemSettings1 = settings;
                VaryingVector3 varyingVector3_1 = new VaryingVector3();
                varyingVector3_1.Function = RainHost.RainScaling;
                VaryingVector3 varyingVector3_2 = varyingVector3_1;
                particleSystemSettings1.SizeBirth = varyingVector3_2;
                settings.FadeOutDuration          = 0.1f;
                PlaneParticleSystemSettings particleSystemSettings2 = settings;
                VaryingColor varyingColor1 = new VaryingColor();
                varyingColor1.Base      = this.RainColor;
                varyingColor1.Variation = new Color(0, 0, 0, 24);
                VaryingColor varyingColor2 = varyingColor1;
                particleSystemSettings2.ColorLife = varyingColor2;
                settings.ColorDeath               = (VaryingColor) new Color(vector3.X, vector3.Y, vector3.Z, 0.0f);
                settings.ColorBirth               = (VaryingColor) new Color(vector3.X, vector3.Y, vector3.Z, 0.0f);
                settings.Texture                  = this.CMProvider.Global.Load <Texture2D>("Other Textures/rain/rain");
                settings.BlendingMode             = BlendingMode.Alphablending;
                settings.Billboarding             = true;
                settings.NoLightDraw              = true;
                this.PlaneSystems.Add(this.RainPS = new PlaneParticleSystem(this.Game, 500, settings));
                for (int index = 0; index < 75; ++index)
                {
                    this.PlaneSystems.RainSplash(Vector3.Zero).FadeOutAndDie(0.0f);
                }
            }
            ContentManager contentManager = this.LevelManager.Name == null ? this.CMProvider.Global : this.CMProvider.CurrentLevel;

            this.lightning = new Mesh()
            {
                Effect  = (BaseEffect) new DefaultEffect.Textured(),
                Texture = (Dirtyable <Texture>)((Texture)this.CMProvider.Global.Load <Texture2D>("Other Textures/rain/lightning_a"))
            };
            this.lightning.AddFace(Vector3.One * new Vector3(16f, 32f, 16f), Vector3.Zero, FaceOrientation.Front, true, true);
            if (this.lightningSounds == null)
            {
                this.lightningSounds = new SoundEffect[4]
                {
                    contentManager.Load <SoundEffect>("Sounds/Graveyard/Thunder1"),
                    contentManager.Load <SoundEffect>("Sounds/Graveyard/Thunder2"),
                    contentManager.Load <SoundEffect>("Sounds/Graveyard/Thunder3"),
                    contentManager.Load <SoundEffect>("Sounds/Graveyard/Thunder4")
                }
            }
            ;
            if (this.thunderDistant == null)
            {
                this.thunderDistant = new SoundEffect[3]
                {
                    contentManager.Load <SoundEffect>("Sounds/Graveyard/ThunderDistant01"),
                    contentManager.Load <SoundEffect>("Sounds/Graveyard/ThunderDistant02"),
                    contentManager.Load <SoundEffect>("Sounds/Graveyard/ThunderDistant03")
                }
            }
            ;
            if (this.sPreThunder == null)
            {
                this.sPreThunder = contentManager.Load <SoundEffect>("Sounds/Graveyard/ThunderRumble");
            }
            this.trileTops = Enumerable.ToArray <TrileInstance>(Enumerable.Where <TrileInstance>((IEnumerable <TrileInstance>) this.LevelManager.Triles.Values, (Func <TrileInstance, bool>)(x =>
            {
                if (x.Enabled && !x.Trile.Immaterial && !ActorTypeExtensions.IsClimbable(x.Trile.ActorSettings.Type) && (x.Trile.Geometry == null || !x.Trile.Geometry.Empty || x.Trile.Faces[FaceOrientation.Front] != CollisionType.None))
                {
                    return(this.NoTop(x));
                }
                else
                {
                    return(false);
                }
            })));
            this.flashIn   = TimeSpan.FromSeconds((double)RandomHelper.Between(4.0, 6.0));
            this.distantIn = TimeSpan.FromSeconds((double)RandomHelper.Between(3.0, 6.0));
        }
Exemple #5
0
 private void TryInitialize()
 {
   foreach (WaterfallsHost.WaterfallState waterfallState in this.Waterfalls)
     waterfallState.Dispose();
   this.Waterfalls.Clear();
   foreach (BackgroundPlane plane in Enumerable.ToArray<BackgroundPlane>((IEnumerable<BackgroundPlane>) this.LevelManager.BackgroundPlanes.Values))
   {
     if (plane.ActorType == ActorType.Waterfall || plane.ActorType == ActorType.Trickle)
     {
       Vector3 vector3_1 = Vector3.Transform(plane.Size * plane.Scale * Vector3.UnitX / 2f, plane.Rotation);
       Vector3 vector = Vector3.Transform(Vector3.UnitZ, plane.Rotation);
       Vector3 vector3_2 = FezMath.XZMask - FezMath.Abs(vector);
       Vector3 vector3_3 = plane.Position + plane.Size * plane.Scale * Vector3.UnitY / 2f - new Vector3(0.0f, 1.0 / 32.0, 0.0f) - vector * 2f / 16f;
       Game game = this.Game;
       int maximumCount = 25;
       PlaneParticleSystemSettings particleSystemSettings1 = new PlaneParticleSystemSettings();
       particleSystemSettings1.SpawnVolume = new BoundingBox()
       {
         Min = vector3_3 - vector3_1,
         Max = vector3_3 + vector3_1
       };
       PlaneParticleSystemSettings particleSystemSettings2 = particleSystemSettings1;
       VaryingVector3 varyingVector3_1 = new VaryingVector3();
       varyingVector3_1.Base = Vector3.Up * 1.6f + vector / 4f;
       varyingVector3_1.Variation = Vector3.Up * 0.8f + vector / 4f + vector3_2 / 2f;
       VaryingVector3 varyingVector3_2 = varyingVector3_1;
       particleSystemSettings2.Velocity = varyingVector3_2;
       particleSystemSettings1.Gravity = new Vector3(0.0f, -0.15f, 0.0f);
       particleSystemSettings1.SpawningSpeed = 5f;
       particleSystemSettings1.RandomizeSpawnTime = true;
       particleSystemSettings1.ParticleLifetime = 2f;
       particleSystemSettings1.FadeInDuration = 0.0f;
       particleSystemSettings1.FadeOutDuration = 0.1f;
       particleSystemSettings1.SizeBirth = (VaryingVector3) new Vector3(1.0 / 16.0);
       particleSystemSettings1.ColorLife = (VaryingColor) (this.LevelManager.WaterType == LiquidType.Sewer ? new Color(215, 232, 148) : new Color(1f, 1f, 1f, 0.75f));
       particleSystemSettings1.Texture = this.CMProvider.Global.Load<Texture2D>("Background Planes/white_square");
       particleSystemSettings1.BlendingMode = BlendingMode.Alphablending;
       particleSystemSettings1.ClampToTrixels = true;
       particleSystemSettings1.Billboarding = true;
       particleSystemSettings1.FullBright = this.LevelManager.WaterType == LiquidType.Sewer;
       particleSystemSettings1.UseCallback = true;
       PlaneParticleSystemSettings settings = particleSystemSettings1;
       PlaneParticleSystem planeParticleSystem = new PlaneParticleSystem(game, maximumCount, settings);
       if (this.LevelManager.WaterType == LiquidType.Sewer)
       {
         planeParticleSystem.DrawOrder = 20;
         planeParticleSystem.Settings.StencilMask = new StencilMask?(StencilMask.Level);
       }
       this.PlaneParticleSystems.Add(planeParticleSystem);
       this.Waterfalls.Add(new WaterfallsHost.WaterfallState(plane, planeParticleSystem, this));
     }
     else if (plane.ActorType == ActorType.Drips)
     {
       Vector3 vector3_1 = new Vector3(plane.Size.X, 0.0f, plane.Size.X) / 2f;
       Vector3 vector3_2 = Vector3.Transform(Vector3.UnitZ, plane.Rotation);
       Vector3 vector3_3 = FezMath.XZMask - FezMath.Abs(vector3_2);
       Vector3 vector3_4 = plane.Position - new Vector3(0.0f, 0.125f, 0.0f);
       bool flag = plane.Crosshatch || plane.Billboard;
       Game game = this.Game;
       int maximumCount = 25;
       PlaneParticleSystemSettings particleSystemSettings1 = new PlaneParticleSystemSettings();
       particleSystemSettings1.SpawnVolume = new BoundingBox()
       {
         Min = vector3_4 - vector3_1,
         Max = vector3_4 + vector3_1
       };
       PlaneParticleSystemSettings particleSystemSettings2 = particleSystemSettings1;
       VaryingVector3 varyingVector3_1 = new VaryingVector3();
       varyingVector3_1.Base = Vector3.Zero;
       varyingVector3_1.Variation = Vector3.Zero;
       VaryingVector3 varyingVector3_2 = varyingVector3_1;
       particleSystemSettings2.Velocity = varyingVector3_2;
       particleSystemSettings1.Gravity = new Vector3(0.0f, -0.15f, 0.0f);
       particleSystemSettings1.SpawningSpeed = 2f;
       particleSystemSettings1.RandomizeSpawnTime = true;
       particleSystemSettings1.ParticleLifetime = 2f;
       particleSystemSettings1.FadeInDuration = 0.0f;
       particleSystemSettings1.FadeOutDuration = 0.0f;
       particleSystemSettings1.SizeBirth = (VaryingVector3) new Vector3(1.0 / 16.0);
       particleSystemSettings1.ColorLife = (VaryingColor) (this.LevelManager.WaterType == LiquidType.Sewer ? new Color(215, 232, 148) : Color.White);
       particleSystemSettings1.Texture = this.CMProvider.Global.Load<Texture2D>("Background Planes/white_square");
       particleSystemSettings1.BlendingMode = BlendingMode.Alphablending;
       particleSystemSettings1.ClampToTrixels = true;
       particleSystemSettings1.FullBright = true;
       PlaneParticleSystemSettings settings = particleSystemSettings1;
       PlaneParticleSystem system = new PlaneParticleSystem(game, maximumCount, settings);
       if (this.LevelManager.WaterType == LiquidType.Sewer)
       {
         system.DrawOrder = 20;
         system.Settings.StencilMask = new StencilMask?(StencilMask.Level);
       }
       if (flag)
       {
         system.Settings.Billboarding = true;
         system.Settings.SpawnVolume = new BoundingBox()
         {
           Min = vector3_4 - vector3_1,
           Max = vector3_4 + vector3_1
         };
       }
       else
       {
         system.Settings.Doublesided = plane.Doublesided;
         system.Settings.SpawnVolume = new BoundingBox()
         {
           Min = vector3_4 - vector3_1 * vector3_3,
           Max = vector3_4 + vector3_1 * vector3_3
         };
         system.Settings.Orientation = new FaceOrientation?(FezMath.OrientationFromDirection(vector3_2));
       }
       this.PlaneParticleSystems.Add(system);
     }
   }
 }