コード例 #1
0
        protected override void InitializeSettings(ParticleSettings settings)
        {
            settings.TextureName = "Textures\\Particles\\sand";

            settings.MaxParticles = 300;

            settings.Duration = TimeSpan.FromSeconds(2);

            settings.DurationRandomness = 1;

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

            settings.MinRotateSpeed = -5f;
            settings.MaxRotateSpeed = 5f;

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

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

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

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

            settings.BlendState = BlendState.AlphaBlend;
        }
コード例 #2
0
        protected override void InitializeSettings(ParticleSettings settings)
        {
            particleKey = "fireparticle";

            settings.MaxParticles = 800;

            settings.Duration = TimeSpan.FromSeconds(2);

            settings.DurationRandomness = 1;

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

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

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

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

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

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

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

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

            settings.MaxParticles = 300;

            settings.Duration = TimeSpan.FromSeconds(1);

            settings.DurationRandomness = 1;

            settings.MinHorizontalVelocity = 0;
            settings.MaxHorizontalVelocity = 1.5f;

            settings.MinVerticalVelocity = 0;
            settings.MaxVerticalVelocity = 2f;

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

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

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

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

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

            // Use additive blending.
            settings.BlendState = BlendState.Additive;
        }
コード例 #4
0
ファイル: ParticleSpark.cs プロジェクト: Whojoo/LittleFlame
        protected override void InitializeSettings(ParticleSettings settings)
        {
            particleKey = "sparkparticle";

            settings.MaxParticles = 200;

            settings.Duration = TimeSpan.FromSeconds(2);

            settings.DurationRandomness = 1;

            settings.MinHorizontalVelocity = -1;
            settings.MaxHorizontalVelocity = 1;

            settings.MinVerticalVelocity = 1;
            settings.MaxVerticalVelocity = 3;

            settings.MinRotateSpeed = 1;
            settings.MaxRotateSpeed = 5;

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

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

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

            settings.MinEndSize = 3;
            settings.MaxEndSize = 4;

            // Use additive blending.
            settings.BlendState = BlendState.AlphaBlend;
        }
コード例 #5
0
        protected override void InitializeSettings(ParticleSettings settings)
        {
            particleKey = "meteorparticle";

            settings.MaxParticles = 300;

            settings.Duration = TimeSpan.FromSeconds(2);

            settings.DurationRandomness = 1;

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

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

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

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

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

            settings.MaxParticles = 600;

            settings.Duration = TimeSpan.FromSeconds(10);

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

            settings.MinVerticalVelocity = 5;
            settings.MaxVerticalVelocity = 10;

            // 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;
        }
コード例 #7
0
        protected override void InitializeSettings(ParticleSettings settings)
        {
            particleKey = "meteorparticle";

            settings.MaxParticles = 300;

            settings.Duration = TimeSpan.FromSeconds(2);

            settings.DurationRandomness = 1;

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

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

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

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

            // Use additive blending.
            settings.BlendState = BlendState.Additive;
        }
コード例 #8
0
ファイル: ParticleSystem.cs プロジェクト: Whojoo/LittleFlame
 /// <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);