/// <summary> /// Constructs a new particle emitter object. /// </summary> public ParticleEmitter(ParticleSystem particleSystem, float particlesPerSecond, Vector2 initialPosition) { this.particleSystem = particleSystem; timeBetweenParticles = 1.0f / particlesPerSecond; position = initialPosition; }
public Silhouetta() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; //apparently for 1280p //this.graphics.PreferredBackBufferWidth = 1920; //this.graphics.PreferredBackBufferHeight = 1280; this.graphics.PreferredBackBufferWidth = 1280; this.graphics.PreferredBackBufferHeight = 720; //graphics.ToggleFullScreen(); screenManager = new ScreenManager(this); gamerServicesComponent = new GamerServicesComponent(this); emitterSystem = new ParticleSystem(this, "EmitterSettings") { DrawOrder = ParticleSystem.AlphaBlendDrawOrder }; Components.Add(emitterSystem); Components.Add(screenManager); Components.Add(gamerServicesComponent); screenManager.AddScreen(new StartScreen(emitterSystem), null); }
public StartScreen(ParticleSystem system) { pSystem = system; TransitionOnTime = TimeSpan.FromSeconds(0.2); TransitionOffTime = TimeSpan.FromSeconds(0.2); }