Exemple #1
0
            public Emitter(IModifier[] modifiers)
            {
                _modifiers = modifiers;

                for (var x = 0; x < Program.ParticleCount; x++)
                {
                    Particles.GetFloatValues("TimeAlive")[x]                   = 0;
                    Particles.GetFloatValues("RotationInRadians")[x]           = 1;
                    Particles.GetVector2Values("Position")[x]                  = new Vector2(100, 100);
                    Particles.GetVector2Values("ReferencePosition")[x]         = new Vector2(100, 100);
                    Particles.GetFloatValues("RotationalVelocityInRadians")[x] = 1f;
                    Particles.GetFloatValues("CurrentRed")[x]                  = 255;
                    Particles.GetFloatValues("CurrentGreen")[x]                = 255;
                    Particles.GetFloatValues("CurrentBlue")[x]                 = 255;
                    Particles.GetFloatValues("CurrentAlpha")[x]                = 255;
                    Particles.GetVector2Values("Size")[x]             = Vector2.Zero;
                    Particles.GetVector2Values("InitialSize")[x]      = new Vector2(32, 32);
                    Particles.GetVector2Values("Velocity")[x]         = new Vector2(100, 100);
                    Particles.GetByteValues("TextureSectionIndex")[x] = 0;
                    Particles.GetByteValues("InitialAlpha")[x]        = 255;
                    Particles.GetByteValues("InitialBlue")[x]         = 255;
                    Particles.GetByteValues("InitialGreen")[x]        = 255;
                    Particles.GetByteValues("InitialRed")[x]          = 255;
                    Particles.GetFloatValues("Altitude")[x]           = 0;
                    Particles.GetFloatValues("AltitudeVelocity")[x]   = 0;
                    Particles.GetIntValues("AltitudeBounceCount")[x]  = 0;
                }
            }