Ejemplo n.º 1
0
        public EngineFlame(int seed, int maxParticles, double particleRate, double spreadFactor)
        {
            _random = new Random(seed);

            _particles = new Particle[maxParticles];

            _availableParticles = new Queue<int>(maxParticles);

            for (int i =0; i < maxParticles; i++)
            {
                _particles[i] = new Particle();

                _availableParticles.Enqueue(i);
            }

            _particleRate = particleRate;
            _spreadFactor = spreadFactor;
        }
Ejemplo n.º 2
0
        public ReEntryFlame(int maxParticles, double particleRate, DVector2 offset)
        {
            _random = new Random();

            _particles = new Particle[maxParticles];

            _availableParticles = new Queue<int>(maxParticles);

            for (int i = 0; i < maxParticles; i++)
            {
                _particles[i] = new Particle();

                _availableParticles.Enqueue(i);
            }

            _particleRate = particleRate;

            _offsetAngle = offset.Angle();
            _offsetLength = offset.Length();
        }
Ejemplo n.º 3
0
        public EngineFlame(int seed, int maxParticles, double particleRate,
                           double minSpread, double maxSpread, double maxAge, double angle = 0)
        {
            _random = new Random(seed);

            _particles = new Particle[maxParticles];

            _availableParticles = new Queue<int>(maxParticles);

            for (int i =0; i < maxParticles; i++)
            {
                _particles[i] = new Particle();

                _availableParticles.Enqueue(i);
            }

            _particleRate = particleRate;
            _minSpread = minSpread;
            _maxSpread = maxSpread;
            _maxAge = maxAge;
            _angle = angle;
        }