Beispiel #1
0
        protected override void InitializeSettings(ParticleSettings settings)
        {
            settings.TextureName = @"Textures/smoke";

            settings.MaxParticles = 27500;

            settings.Duration = TimeSpan.FromSeconds(9999);

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

            settings.MinVerticalVelocity = 0;
            settings.MaxVerticalVelocity = 0;

            settings.EndVelocity = 0;

            settings.MinColor = Color.LightGray *0.2f;
            settings.MaxColor = Color.LightGray *0.2f;

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

            settings.MinStartSize = 250;
            settings.MaxStartSize = 250;

            settings.MinEndSize = 250;
            settings.MaxEndSize = 250;

            settings.BlendState = BlendState.AlphaBlend;
        }
Beispiel #2
0
        protected override void InitializeSettings(ParticleSettings settings)
        {
            settings.TextureName = @"Textures/explosion";

            settings.MaxParticles = 500;

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

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

            settings.MinVerticalVelocity = 0;
            settings.MaxVerticalVelocity = 0;

            settings.EndVelocity = 0;

            settings.MinColor = Color.DarkGray * 0.7f;
            settings.MaxColor = Color.Gray * 0.7f;

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

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

            settings.MinEndSize = 1;
            settings.MaxEndSize = 3;
            settings.EmitterVelocitySensitivity = 0.2f;

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

            settings.MaxParticles = 5000;

            settings.Duration = TimeSpan.FromSeconds(1.5f);
            settings.DurationRandomness = 0.5f;

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

            settings.MinVerticalVelocity = 0;
            settings.MaxVerticalVelocity = 0;

            settings.EndVelocity = 1f;

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

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

            settings.MinStartSize = 4;
            settings.MaxStartSize = 6;

            settings.MinEndSize = 9;
            settings.MaxEndSize = 20;
            settings.EmitterVelocitySensitivity = 0.3f;

            settings.BlendState = BlendState.AlphaBlend;
        }
Beispiel #4
0
        protected override void InitializeSettings(ParticleSettings settings)
        {
            settings.TextureName = @"Textures/Shrapnel";

            settings.MaxParticles = 100;

            settings.Duration = TimeSpan.FromSeconds(2);

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

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

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

            settings.EndVelocity = 0;

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

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

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

            settings.MinEndSize = 10;
            settings.MaxEndSize = 40;
        }
Beispiel #5
0
        public ParticleStarSheet(GraphicsDevice graphicsDevice, Vector3 maxPosition, int maxParticles, Texture2D particleColorsTexture, ParticleSettings particlesSettings, Effect particleEffect)
        {
            this.maxParticles = maxParticles;
            this.graphicDevice = graphicsDevice;
            this.particleSettings = particlesSettings;
            this.particleEffect = particleEffect;
            this.particleColorsTexture = particleColorsTexture;
            this.maxPosition = maxPosition;

            InitializeParticleVertices();
        }
Beispiel #6
0
        public ShipExplosion(GraphicsDevice graphicsDevice, Vector3 position, int lifeLeft,
            int roundTime, int numParticlesPerRound, int maxParticles, Texture2D particleColorsTexture,
            ParticleSettings particleSettings, Effect particleEffect)
            : base(graphicsDevice, particleEffect,
            particleColorsTexture, maxParticles)
        {
            this.position = position;
            this.lifeLeft = lifeLeft;
            this.numParticlesPerRound = numParticlesPerRound;
            this.roundTime = roundTime;
            this.particleSettings = particleSettings;

            InitializeParticleVertices();
        }
Beispiel #7
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);