public StationaryParticleEmitter(ref ParticleSystem system, Vector3 initialPos,
     int xRadius, int yRadius, int zRadius, int numParticlesToEmit)
 {
     particleSystem = system;
     position = initialPos;
     this.xRadius = xRadius;
     this.yRadius = yRadius;
     this.zRadius = zRadius;
     this.numParticlesToEmit = numParticlesToEmit;
 }
Exemple #2
0
        public ParticleEmitter(Game Game, ParticleSystem particleSystem,
                               float particlesPerSecond, float lifeTime, Vector3 location)
            : base(Game)
        {
            this.particleSystem = particleSystem;

            timeBetweenParticles = 1.0f / particlesPerSecond;

            previousPosition = location;
            this.lifeTime = lifeTime;
            particleSystem.Initialize();
            particleSystem.LoadContent();
        }
Exemple #3
0
 public static void addParticleEmitter(Game game,ParticleSystem particleSystem,
                        float particlesPerSecond,float lifeTime ,Func<Vector3> getLocation)
 {
     particleEmitterManager.particleManagers.Add(new ParticleEmitter(game, particleSystem, particlesPerSecond, lifeTime, getLocation));
 }