Exemple #1
0
        //private RagdollMuscle ragdoll;

        public GrabHands(RagdollMuscle ragdoll, World world) : base(ragdoll)
        {
            this.world = world;
            //this.ragdoll = ragdoll;

            ragdoll.KnockOut += new EventHandler(ragdoll_KnockOut);
        }
Exemple #2
0
 public JetPack(RagdollMuscle ragdoll = null)
 {
     if (ragdoll != null)
     {
         Init(ragdoll);
     }
 }
Exemple #3
0
        bool f_BeforeCollision(Fixture fixtureA, Fixture fixtureB)
        {
            Fixture other = fixtureA;

            if (Body.FixtureList.Contains(fixtureA))
            {
                other = fixtureB;
            }

            RagdollMuscle ragdoll = ragdollManager.GetFixtureOwner(other);

            if (ragdoll != null)
            {
                DoPickupAction(ragdoll);

                farseerManager.world.RemoveBody(Body);
                Taken = true;
                if (PickedUp != null)
                {
                    PickedUp(this, null);
                }
                return(false);
            }

            return(true);
        }
 public void CreateNewRagdoll(KinectRagdollGame game)
 {
     ragdoll = new RagdollMuscle(game.farseerManager.world, Vector2.Zero);
     ragdoll.Equipment.Add(new StabilizedJetpack(ragdoll));
     ragdoll.Equipment.Add(new BubbleShield(ragdoll, game.farseerManager.world));
     CameraShouldTrack = true;
 }
        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();
        }
Exemple #6
0
 public WristVelocityEquipment(RagdollMuscle ragdoll = null)
 {
     if (ragdoll != null)
     {
         Init(ragdoll);
     }
 }
Exemple #7
0
        public override void DoPickupAction(RagdollMuscle ragdoll)
        {
            ApplyPowerup(ragdoll);

            if (Song != null)
            {
                Jukebox.Play(Song);
            }
        }
        public override void Init(FarseerPhysics.Dynamics.World w, Kinect.RagdollManager r)
        {
            world  = w;
            target = r.ragdoll;
            body.setWorld(w);

            body.OnCollision += new OnCollisionEventHandler(body_OnCollision);

            world.ProcessChanges();
            IsOperational = true;
        }
Exemple #9
0
        public override void Init(RagdollMuscle ragdoll)
        {
            rand = new Random();

            this.ragdoll = ragdoll;

            ragdoll.KnockOut   += new EventHandler(ragdoll_KnockOut);
            soundTimer          = new Timer(100);
            soundTimer.Elapsed -= new ElapsedEventHandler(soundTimer_Elapsed);
            soundTimer.Elapsed += new ElapsedEventHandler(soundTimer_Elapsed);
        }
Exemple #10
0
 public Flappers(RagdollMuscle ragdoll = null)
     : base(ragdoll)
 {
 }
Exemple #11
0
 public override void Init(RagdollMuscle ragdoll)
 {
     base.Init(ragdoll);
     ragdoll.KnockOut += new EventHandler(ragdoll_KnockOut);
 }
Exemple #12
0
 public abstract void DoPickupAction(RagdollMuscle ragdoll);
Exemple #13
0
 public PunchGuns(World world, int cooldown, RagdollMuscle ragdoll = null) : base(world, cooldown, ragdoll)
 {
 }
Exemple #14
0
 public void ApplyPowerup(RagdollMuscle ragdoll)
 {
     ragdoll.Equipment = Equipment;
 }
Exemple #15
0
 public abstract void Init(RagdollMuscle ragdoll);
        //protected float angularStabilizationTorque;



        public StabilizedJetpack(RagdollMuscle ragdoll = null) : base(ragdoll)
        {
        }
Exemple #17
0
 public PunchEquipment(World world, int cooldown, RagdollMuscle ragdoll = null) : base(ragdoll)
 {
     //this.ragdoll = ragdoll;
     this.world    = world;
     this.cooldown = cooldown;
 }
Exemple #18
0
 public override void Init(RagdollMuscle ragdoll)
 {
     this.ragdoll               = ragdoll;
     ragdoll.WakeUp            += new EventHandler(Reset);
     ragdoll.PossessedByPlayer += new EventHandler(Reset);
 }
Exemple #19
0
        //private const float SPEED_THRESHOLD = .6f;
        //private const float SPEED_THRESHOLD = .6f;
        //private const float EXTENSION_THRESHOLD = 2.3f;

        public SpideySilk(World world, int cooldown, int range, RagdollMuscle ragdoll = null)
            : base(world, cooldown, ragdoll)
        {
            this.range = range;
        }
Exemple #20
0
 public override void Init(RagdollMuscle ragdoll)
 {
     this.ragdoll      = ragdoll;
     ragdoll.KnockOut += new EventHandler(ragdoll_KnockOut);
     this.world        = KinectRagdollGame.Main.farseerManager.world;
 }
Exemple #21
0
 public BubbleShield(RagdollMuscle r, World w)
 {
     this.world = w;
     Init(r);
 }
Exemple #22
0
        public override void Init(RagdollMuscle ragdoll)
        {
            base.Init(ragdoll);

            this.world = KinectRagdollGame.Main.farseerManager.world;
        }