protected override void InitializeSettings(ParticleSettings settings)
        {
            settings.TextureName = "explosion";

            settings.MaxParticles = 100;

            settings.Duration = TimeSpan.FromSeconds(2);
            settings.DurationRandomness = 1;

            settings.MinHorizontalVelocity = 20;
            settings.MaxHorizontalVelocity = 30;

            settings.MinVerticalVelocity = -20;
            settings.MaxVerticalVelocity = 20;

            settings.EndVelocity = 0;

            settings.MinColor = Color.DarkGray;
            settings.MaxColor = Color.Gray;

            settings.MinRotateSpeed = -1;
            settings.MaxRotateSpeed = 1;

            settings.MinStartSize = 7;
            settings.MaxStartSize = 7;

            settings.MinEndSize = 70;
            settings.MaxEndSize = 140;

            // Use additive blending.
            settings.BlendState = BlendState.Additive;
        }
Beispiel #2
0
        protected override void InitializeSettings(ParticleSettings settings)
        {
            settings.TextureName = "fire";

            settings.MaxParticles = 2400;

            settings.Duration = TimeSpan.FromSeconds(2);

            settings.DurationRandomness = 1;

            settings.MinHorizontalVelocity = 0;
            settings.MaxHorizontalVelocity = 15;

            settings.MinVerticalVelocity = -10;
            settings.MaxVerticalVelocity = 10;

            // Set gravity upside down, so the flames will 'fall' upward.
            settings.Gravity = new Vector3(0, 15, 0);

            settings.MinColor = new Color(255, 255, 255, 10);
            settings.MaxColor = new Color(255, 255, 255, 40);

            settings.MinStartSize = 5;
            settings.MaxStartSize = 10;

            settings.MinEndSize = 10;
            settings.MaxEndSize = 40;

            // Use additive blending.
            settings.BlendState = BlendState.Additive;
        }
        protected override void InitializeSettings(ParticleSettings settings)
        {
            settings.TextureName = "smoke";

            settings.MaxParticles = 200;

            settings.Duration = TimeSpan.FromSeconds(4);

            settings.MinHorizontalVelocity = 0;
            settings.MaxHorizontalVelocity = 50;

            settings.MinVerticalVelocity = -10;
            settings.MaxVerticalVelocity = 50;

            settings.Gravity = new Vector3(0, -20, 0);

            settings.EndVelocity = 0;

            settings.MinColor = Color.LightGray;
            settings.MaxColor = Color.White;

            settings.MinRotateSpeed = -2;
            settings.MaxRotateSpeed = 2;

            settings.MinStartSize = 7;
            settings.MaxStartSize = 7;

            settings.MinEndSize = 70;
            settings.MaxEndSize = 140;
        }
        protected override void InitializeSettings(ParticleSettings settings)
        {
            settings.TextureName = "smoke";

            settings.MaxParticles = 600;

            settings.Duration = TimeSpan.FromSeconds(10);

            settings.MinHorizontalVelocity = 0;
            settings.MaxHorizontalVelocity = 15;

            settings.MinVerticalVelocity = 10;
            settings.MaxVerticalVelocity = 20;

            // Create a wind effect by tilting the gravity vector sideways.
            settings.Gravity = new Vector3(-20, -5, 0);

            settings.EndVelocity = 0.75f;

            settings.MinRotateSpeed = -1;
            settings.MaxRotateSpeed = 1;

            settings.MinStartSize = 4;
            settings.MaxStartSize = 7;

            settings.MinEndSize = 35;
            settings.MaxEndSize = 140;
        }
        protected override void InitializeSettings(ParticleSettings settings)
        {
            settings.TextureName = "smoke";

            settings.MaxParticles = 1000;

            settings.Duration = TimeSpan.FromSeconds(3);

            settings.DurationRandomness = 1.5f;

            settings.EmitterVelocitySensitivity = 0.1f;

            settings.MinHorizontalVelocity = 0;
            settings.MaxHorizontalVelocity = 1;

            settings.MinVerticalVelocity = -1;
            settings.MaxVerticalVelocity = 1;

            settings.MinColor = new Color(64, 96, 128, 255);
            settings.MaxColor = new Color(255, 255, 255, 128);

            settings.MinRotateSpeed = -4;
            settings.MaxRotateSpeed = 4;

            settings.MinStartSize = 1;
            settings.MaxStartSize = 3;

            settings.MinEndSize = 4;
            settings.MaxEndSize = 11;
        }
Beispiel #6
0
        protected virtual void InitializeSettings(ParticleSettings settings, Hashtable parameters)
        {
            object o;
            settings.TextureName = (o = parameters["TextureName"]) != null ? (string)o : "fire";

            settings.MaxParticles = int.Parse((o = parameters["MaxParticles"]) != null ? (string)o : "100");

            settings.Duration = TimeSpan.FromSeconds(double.Parse((o = parameters["Duration"]) != null ? (string)o : "2"));
            settings.DurationRandomness = int.Parse((o = parameters["DurationRandomness"]) != null ? (string)o : "1");

            settings.MinHorizontalVelocity = float.Parse((o = parameters["MinHorizontalVelocity"]) != null ? (string)o : "4.0");
            settings.MaxHorizontalVelocity = float.Parse((o = parameters["MaxHorizontalVelocity"]) != null ? (string)o : "4.0");

            settings.MinVerticalVelocity = float.Parse((o = parameters["MinVerticalVelocity"]) != null ? (string)o : "-4.0");
            settings.MaxVerticalVelocity = float.Parse((o = parameters["MaxVerticalVelocity"]) != null ? (string)o : "4.0");

            settings.EndVelocity = float.Parse((o = parameters["EndVelocity"]) != null ? (string)o : "0");

            settings.MinColor = new Color(
                int.Parse((o = parameters["MinColorR"]) != null ? (string)o : "255"),
                int.Parse((o = parameters["MinColorG"]) != null ? (string)o : "255"),
                int.Parse((o = parameters["MinColorB"]) != null ? (string)o : "255"),
                int.Parse((o = parameters["MinColorA"]) != null ? (string)o : "255")
                );
            settings.MaxColor = new Color(
                int.Parse((o = parameters["maxColorR"]) != null ? (string)o : "255"),
                int.Parse((o = parameters["maxColorG"]) != null ? (string)o : "255"),
                int.Parse((o = parameters["maxColorB"]) != null ? (string)o : "255"),
                int.Parse((o = parameters["maxColorA"]) != null ? (string)o : "255")
                );

            settings.MinRotateSpeed = float.Parse((o = parameters["MinRotateSpeed"]) != null ? (string)o : "4.0");
            settings.MaxRotateSpeed = float.Parse((o = parameters["MaxRotateSpeed"]) != null ? (string)o : "4.0");

            settings.MinStartSize = float.Parse((o = parameters["MinStartSize"]) != null ? (string)o : "4.0");
            settings.MaxStartSize = float.Parse((o = parameters["MaxStartSize"]) != null ? (string)o : "4.0");

            settings.MinEndSize = float.Parse((o = parameters["MinEndSize"]) != null ? (string)o : "4.0");
            settings.MaxEndSize = float.Parse((o = parameters["MaxEndSize"]) != null ? (string)o : "4.0");

            // Use additive blending.
            settings.BlendState = BlendState.Additive;
        }
Beispiel #7
0
 /// <summary>
 /// Derived particle system classes should override this method
 /// and use it to initalize their tweakable settings.
 /// </summary>
 protected virtual void InitializeSettings(ParticleSettings settings)
 {
 }