Пример #1
0
 /// <summary>
 /// Constructs a new projectile.
 /// </summary>
 public Projectile(ParticleSystem explosionParticles,
                   ParticleSystem explosionSmokeParticles,
                   ParticleSystem projectileTrailParticles)
 {
     // Use the particle emitter helper to output our trail particles.
     trailEmitter = new ParticleEmitter(projectileTrailParticles,
                                        trailParticlesPerSecond, position);
 }
Пример #2
0
        /// <summary>
        /// Constructs a new particle emitter object.
        /// </summary>
        public ParticleEmitter(ParticleSystem particleSystem,
                               float particlesPerSecond, Vector3 initialPosition)
        {
            this.particleSystem = particleSystem;

            timeBetweenParticles = 1.0f / particlesPerSecond;

            previousPosition = initialPosition;
        }