Beispiel #1
0
        private void apply_Click(object sender, EventArgs e)
        {
            //List<AbstractEquipment> equipment = new List<AbstractEquipment>();

            //if (jetpack.Checked) equipment.Add(new StabilizedJetpack());


            foreach (Body b in selectedBodies)
            {
                Powerup p;

                if (b.FixtureList.Count > 0)
                {
                    RagdollMuscle r = game.ragdollManager.GetFixtureOwner(b.FixtureList[0]);
                    if (r != null)
                    {
                        p = new Powerup(game.ragdollManager, game.farseerManager);
                        populatePowerup(p);
                        p.DoPickupAction(r);
                        continue;
                    }
                }


                p = game.powerupManager.AddPowerup(b);
                populatePowerup(p);
            }

            Close();
        }