Beispiel #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);
        }
Beispiel #2
0
 public JetPack(RagdollMuscle ragdoll = null)
 {
     if (ragdoll != null)
     {
         Init(ragdoll);
     }
 }
Beispiel #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;
 }
Beispiel #5
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();
        }
Beispiel #6
0
 public WristVelocityEquipment(RagdollMuscle ragdoll = null)
 {
     if (ragdoll != null)
     {
         Init(ragdoll);
     }
 }
Beispiel #7
0
        public override void DoPickupAction(RagdollMuscle ragdoll)
        {
            ApplyPowerup(ragdoll);

            if (Song != null)
            {
                Jukebox.Play(Song);
            }
        }
Beispiel #8
0
        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;
        }
Beispiel #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);
        }
Beispiel #10
0
 public Flappers(RagdollMuscle ragdoll = null)
     : base(ragdoll)
 {
 }
Beispiel #11
0
 public override void Init(RagdollMuscle ragdoll)
 {
     base.Init(ragdoll);
     ragdoll.KnockOut += new EventHandler(ragdoll_KnockOut);
 }
Beispiel #12
0
 public abstract void DoPickupAction(RagdollMuscle ragdoll);
Beispiel #13
0
 public PunchGuns(World world, int cooldown, RagdollMuscle ragdoll = null) : base(world, cooldown, ragdoll)
 {
 }
Beispiel #14
0
 public void ApplyPowerup(RagdollMuscle ragdoll)
 {
     ragdoll.Equipment = Equipment;
 }
Beispiel #15
0
 public abstract void Init(RagdollMuscle ragdoll);
        //protected float angularStabilizationTorque;



        public StabilizedJetpack(RagdollMuscle ragdoll = null) : base(ragdoll)
        {
        }
Beispiel #17
0
 public PunchEquipment(World world, int cooldown, RagdollMuscle ragdoll = null) : base(ragdoll)
 {
     //this.ragdoll = ragdoll;
     this.world    = world;
     this.cooldown = cooldown;
 }
Beispiel #18
0
 public override void Init(RagdollMuscle ragdoll)
 {
     this.ragdoll               = ragdoll;
     ragdoll.WakeUp            += new EventHandler(Reset);
     ragdoll.PossessedByPlayer += new EventHandler(Reset);
 }
Beispiel #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;
        }
Beispiel #20
0
 public override void Init(RagdollMuscle ragdoll)
 {
     this.ragdoll      = ragdoll;
     ragdoll.KnockOut += new EventHandler(ragdoll_KnockOut);
     this.world        = KinectRagdollGame.Main.farseerManager.world;
 }
Beispiel #21
0
 public BubbleShield(RagdollMuscle r, World w)
 {
     this.world = w;
     Init(r);
 }
Beispiel #22
0
        public override void Init(RagdollMuscle ragdoll)
        {
            base.Init(ragdoll);

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