/// <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; }
public Player(Game1 game, Vector3 p, float s) : base(game) { this.game = game; MAX_SPEED = 10; theModel = game.Content.Load<Model>("Models\\Player\\ship"); player_position = p; scale = s; funnelSmokePlume = new SmokePlumeParticleSystem(game, game.Content); funnelSmokePlume.DrawOrder=4; game.Components.Add(funnelSmokePlume); explosion = new ExplosionParticleSystem(game, game.Content); explosion.DrawOrder = 4; explosionSmoke = new ExplosionSmokeParticleSystem(game, game.Content); explosionSmoke.DrawOrder = 4; playerSfx = game.getSoundPlayer(); trainSoundCue = playerSfx.getCue("trainsSound"); playerSfx.playCue(trainSoundCue); trainSoundCue.SetVariable("TrainSpeed", 0); }