Settings class describes all the tweakable options used to control the appearance of a particle system.
        protected override void InitializeSettings(MSParticleSettings settings)
        {
            settings.TextureName = "smoke2";

            settings.MaxParticles = 600;

            settings.Duration = TimeSpan.FromSeconds(7);

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

            settings.EndVelocity = 0;

            settings.MinStartSize = 20;
            settings.MaxStartSize = 50;

            settings.MinEndSize = 12;
            settings.MaxEndSize = 16;

            settings.MinColor = new Color(255, 255, 255, 60);
            settings.MaxColor = new Color(255, 255, 255, 90);

            settings.BlendState = BlendState.Additive;
        }
Example #2
0
 /// <summary>
 /// Derived particle system classes should override this method
 /// and use it to initalize their tweakable settings.
 /// </summary>
 protected abstract void InitializeSettings(MSParticleSettings settings);