/*public static ParticleSystem[] GetDirtyBomb(Vector2 pos, float rad) { var pfire = new ParticleSystem(pos, rad * 2 / 5, 25, 1, rad, 1, 3f, ContentRepository.Repository["fire"]); pfire.InitVelocities(0, rad*3); var psmoke = new ParticleSystem(pos, rad * 2 / 5, 10, 2f, rad * 2, 1, 1f, ContentRepository.Repository["smoke"]); psmoke.InitVelocities(0, rad*5); return new ParticleSystem[] { pfire, psmoke }; }*/ public static ParticleSystem[] GetDirtyBomb(Vector2 pos, float rad) { var pfire = new ParticleSystem(pos, rad * 2 / 5, 25, 1, rad, 1, 3f, ContentRepository.Repository["fire"]); pfire.InitVelocities(0, rad * 3); var psmoke = new ParticleSystem(pos, rad * 2 / 5, 10, 2f, rad * 2, 1, 1f, ContentRepository.Repository["smoke"]); psmoke.InitVelocities(0, rad * 3); return new ParticleSystem[] { pfire, psmoke }; }
public static ParticleSystem[] GetDirtyBomb(Vector2 pos) { var pfire = new ParticleSystem(pos, 20, 25, 1, 50, 1, 3f, ContentRepository.Repository["fire"]); pfire.InitVelocities(0, 200); var psmoke = new ParticleSystem(pos, 20, 10, 2f, 100, 1, 1f, ContentRepository.Repository["smoke"]); psmoke.InitVelocities(0, 300); return new ParticleSystem[] { pfire, psmoke }; }
void frame_MouseClick(GUIElement sender, MouseEventArgs e) { if (e.isClicked(MouseButtons.Right)) { var pfire = new ParticleSystem(new Vector2(e.CurrentMouseState.X, e.CurrentMouseState.Y), 15, 100, 1, 10, 1, 3f, fire); pfire.InitVelocities(0, 110); PE.AddParticleSystem(pfire); var psmoke = new ParticleSystem(new Vector2(e.CurrentMouseState.X, e.CurrentMouseState.Y), 25, 100, 2f, 20, 1, 1f, smoke); psmoke.InitVelocities(0, 200); PE.AddParticleSystem(psmoke); } else if (e.isClicked(MouseButtons.Left)) { PE.AddParticleSystems(ParticleSystemFactory.GetDirtyBomb(new Vector2(e.CurrentMouseState.X, e.CurrentMouseState.Y), 50)); } }
public void AddParticleSystem(ParticleSystem psys) { PSystems.Add(psys); }