Settings class describes all the tweakable options used to control the appearance of a particle system.
コード例 #1
0
        protected override void InitializeSettings(ParticleSettings settings)
        {
            settings.TextureName = "Textures\\poison";

            settings.MaxParticles = 10000;

            settings.Duration = TimeSpan.FromMilliseconds(1000);

            settings.DurationRandomness = 1;

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

            settings.MinVerticalVelocity = -1.5f;
            settings.MaxVerticalVelocity = 1.5f;

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

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

            settings.MinStartSize = 1.5f;
            settings.MaxStartSize = 1.5f;

            settings.MinEndSize = 0;
            settings.MaxEndSize = 1;

            //// Use additive blending.
            //settings.SourceBlend = Blend.SourceAlpha;
            //settings.DestinationBlend = Blend.InverseSourceAlpha;
        }
コード例 #2
0
        protected override void InitializeSettings(ParticleSettings settings)
        {
            settings.TextureName = "Textures\\destroySpell";

            settings.MaxParticles = 10000;

            settings.Duration = TimeSpan.FromMilliseconds(2000);

            settings.DurationRandomness = 1;

            settings.MinHorizontalVelocity = -0.5f;
            settings.MaxHorizontalVelocity = 0.5f;

            settings.MinVerticalVelocity = -0.5f;
            settings.MaxVerticalVelocity = 0.5f;

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

            settings.MinColor = new Color(0, 0, 255, 100);
            settings.MaxColor = new Color(255, 255, 255, 170);

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

            settings.MinEndSize = 1;
            settings.MaxEndSize = 1;

            // Use additive blending.
            settings.BlendState = BlendState.Additive;
        }
コード例 #3
0
        protected override void InitializeSettings(ParticleSettings settings)
        {
            settings.TextureName = "Textures\\particle";

            settings.MaxParticles = 10000;

            settings.Duration = TimeSpan.FromMilliseconds(8000);

            settings.DurationRandomness = 1;

            settings.MinHorizontalVelocity = 0.3f;
            settings.MaxHorizontalVelocity = -0.3f;

            settings.MinVerticalVelocity = 0.0f;
            settings.MaxVerticalVelocity = -5.0f;

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

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

            settings.MinStartSize = 1f;
            settings.MaxStartSize = 1f;

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

            // Use additive blending.
            settings.BlendState = BlendState.Additive;
        }
コード例 #4
0
        protected override void InitializeSettings(ParticleSettings settings)
        {
            settings.TextureName = "Textures\\deadEnemy";

            settings.MaxParticles = 10000;

            settings.Duration           = TimeSpan.FromMilliseconds(500);
            settings.DurationRandomness = 1;

            settings.MinHorizontalVelocity = 5;
            settings.MaxHorizontalVelocity = 10;

            settings.MinVerticalVelocity = -5;
            settings.MaxVerticalVelocity = 5;

            settings.EndVelocity = 0;

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

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

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

            settings.MinEndSize = 3;
            settings.MaxEndSize = 6;

            // Use additive blending.
            settings.BlendState = BlendState.Additive;
        }
コード例 #5
0
        protected override void InitializeSettings(ParticleSettings settings)
        {
            settings.TextureName = "Textures\\poison";

            settings.MaxParticles = 10000;

            settings.Duration = TimeSpan.FromMilliseconds(1000);

            settings.DurationRandomness = 1;

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

            settings.MinVerticalVelocity = -1.5f;
            settings.MaxVerticalVelocity = 1.5f;

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

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

            settings.MinStartSize = 1.5f;
            settings.MaxStartSize = 1.5f;

            settings.MinEndSize = 0;
            settings.MaxEndSize = 1;

            //// Use additive blending.
            //settings.SourceBlend = Blend.SourceAlpha;
            //settings.DestinationBlend = Blend.InverseSourceAlpha;
        }
コード例 #6
0
        protected override void InitializeSettings(ParticleSettings settings)
        {
            settings.TextureName = "Textures\\destroySpell";

            settings.MaxParticles = 10000;

            settings.Duration = TimeSpan.FromMilliseconds(600);
            settings.DurationRandomness = 1;

            settings.MinHorizontalVelocity = 5;
            settings.MaxHorizontalVelocity = 10;

            settings.MinVerticalVelocity = -5;
            settings.MaxVerticalVelocity = 5;

            settings.EndVelocity = 0;

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

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

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

            settings.MinEndSize = 1;
            settings.MaxEndSize = 4;

            // Use additive blending.
            settings.BlendState = BlendState.Additive;
        }
コード例 #7
0
        protected override void InitializeSettings(ParticleSettings settings)
        {
            settings.TextureName = "Textures\\blue_energy";

            settings.MaxParticles = 10000;

            settings.Duration           = TimeSpan.FromMilliseconds(1000);
            settings.DurationRandomness = 1;

            settings.MinHorizontalVelocity = 5;
            settings.MaxHorizontalVelocity = 5;

            settings.MinVerticalVelocity = -5;
            settings.MaxVerticalVelocity = 15;

            settings.EndVelocity = 0;

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

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

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

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

            settings.MinEndSize = 2;
            settings.MaxEndSize = 3;

            settings.BlendState = BlendState.Additive;
        }
コード例 #8
0
 /// <summary>
 /// Derived particle system classes should override this method
 /// and use it to initalize their tweakable settings.
 /// </summary>
 protected abstract void InitializeSettings(ParticleSettings settings);
コード例 #9
0
 /// <summary>
 /// Derived particle system classes should override this method
 /// and use it to initalize their tweakable settings.
 /// </summary>
 protected abstract void InitializeSettings(ParticleSettings settings);