protected override void InitializeSettings(ParticleSettings settings)
        {
            settings.TextureName = "Textures/smoke";

            settings.MaxParticles = 600;

            settings.Duration = TimeSpan.FromSeconds(10);

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

            settings.MinVerticalVelocity = 0.1f;
            settings.MaxVerticalVelocity = 0.2f;

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

            settings.EndVelocity = 0.75f;

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

            settings.MinStartSize = 0.05f;
            settings.MaxStartSize = 0.01f;

            settings.MinEndSize = 0.5f;
            settings.MaxEndSize = 1;
        }
예제 #2
0
        protected override void InitializeSettings(ParticleSettings settings)
        {
            settings.TextureName = "Textures/fire";

            settings.MaxParticles = 2400;

            settings.Duration = TimeSpan.FromSeconds(0.2f);

            settings.DurationRandomness = 1;

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

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

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

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

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

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

            // Use additive blending.
            settings.SourceBlend = Blend.SourceAlpha;
            settings.DestinationBlend = Blend.One;
        }
예제 #3
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);