void cleanup() { lowHealthBeeping.Stop(); superFireballRolling.Stop(); Laser2.Lasers.Clear(); Fireball.Fireballs.Clear(); PowerUp.AlivePowerUps.Clear(); Potion.Potions.Clear(); //SeekerSnake.SeekerSnakes.Clear(); MouseSeeker.RemoveAll(); Bullet.Peanuts.Clear(); isaac = null; //alex = null; }
void shootMice(Character isaac) { Vector2 mousePoint = MagicStaffPoint + new Vector2(magicStaff.Width * (float)Math.Cos(magicStaff.Rotation), magicStaff.Width * (float)Math.Sin(magicStaff.Rotation)); BaseObject target = new BaseObject(new Rectangle((int)isaac.CenterPoint.X, (int)isaac.CenterPoint.Y, 1, 1)); float beginAngle = magicStaff.Rotation - (float)Math.PI / 2; float endAngle = magicStaff.Rotation + (float)Math.PI / 2; int numberOfMice = 10; //float rotation = (float)Math.PI / numberOfMice; float rotation = MathHelper.TwoPi / numberOfMice; for (int i = 0; i < numberOfMice; i++, beginAngle += rotation) { //MouseSeeker m = new MouseSeeker(mousePoint, 300, 15, 2, 25, isaac, 2); MouseSeeker m = new MouseSeeker(mousePoint, miceSpeed, miceSize, cordSize, miceLength, magicStaff.Rotation, 5); m.Angle = beginAngle; } }