public void Flames() { if (primed) { for (int i = 0; i < 2; i++) { float minArc = player.Angle - arc; float maxArc = player.Angle + arc; float direction = (float)(minArc + GameConst.rand.NextDouble() * arc) + (float)(Math.PI / 2); direction -= (float)(Math.PI); FlameParticle fp = new FlameParticle(player.Position, direction); World.BulletManager.AddParticle(fp); } } shooting = true; }
public override void Shoot() { if (primed) { if (flameSound != null) { if (!flameSound.IsPlaying) { flameSound = SoundManager.SoundBank.GetCue("flames"); flameSound.Play(); volume = 1; } } else { volume = 1; flameSound = SoundManager.SoundBank.GetCue("flames"); flameSound.Play(); } for (int i = 0; i < 2; i++) { float minArc = player.Angle - arc; float maxArc = player.Angle + arc; float direction = (float)(minArc + GameConst.rand.NextDouble() * arc) + (float)(Math.PI / 2); direction -= (float)(Math.PI); FlameParticle fp = new FlameParticle(new Vector2(player.Position.X + player.Rect.Width / 2, player.Position.Y + player.Rect.Height / 2), direction); World.BulletManager.AddParticle(fp); } clip--; } else { if (flameSound != null) { if (flameSound.IsPlaying) { flameSound.Stop(AudioStopOptions.Immediate); } } } }