public KinectRagdollGame()
        {
            Main = this;

            graphics = new GraphicsDeviceManager(this);
            graphics.PreferredBackBufferWidth = WIDTH;
            graphics.PreferredBackBufferHeight = HEIGHT;

           
            Content.RootDirectory = "Content";

            FarseerTextures.Init();
            FarseerTextures.SetGame(this);
            
            kinectManager = new KinectManager();
            farseerManager = new FarseerManager(true, this);
            ragdollManager = new RagdollManager();
            
            actionCenter = new ActionCenter(this);
            inputManager = new InputManager(this);
            
            //spriteHelper = new SpriteHelper();
            objectiveManager = new ObjectiveManager(this);
            powerupManager = new PowerupManager(ragdollManager, farseerManager);
            jukebox = new Jukebox();
            hazardManager = new HazardManager(farseerManager, ragdollManager);
            particleEffectManager = new ParticleEffectManager(graphics, ref farseerProjection);

            toolbox = new Toolbox(this);


            this.IsMouseVisible = true;
            bkColor = Color.CornflowerBlue;

        }
Exemple #2
0
        public Turret(Vector2 farseerLoc, World w, RagdollManager r, Fixture f)
        {
            

            DebugMaterial gray = new DebugMaterial(MaterialType.Blank)
            {
                Color = Color.DarkGray
            };

            body = new Body(w);
            pivot = FixtureFactory.AttachCircle(.9f, 1, body, gray);
            FixtureFactory.AttachRectangle(barrelLength, .5f, 1, new Vector2(barrelLength / 2, 0), body, gray);
            body.Position = farseerLoc;
            body.BodyType = BodyType.Dynamic;
            //b.CollidesWith = Category.None;

            if (f == null)
            {

                motor = JointFactory.CreateFixedRevoluteJoint(w, body, Vector2.Zero, farseerLoc);
            }
            else
            {
                motor = new RevoluteJoint(body, f.Body, Vector2.Zero, f.Body.GetLocalPoint(farseerLoc));
                w.AddJoint(motor);
            }

            motor.MotorEnabled = true;
            motor.MaxMotorTorque = 5000;

            Init(w, r);
        }
Exemple #3
0
        internal Pickup(Body b, RagdollManager ragdollManager, FarseerManager farseerManager) : this(ragdollManager, farseerManager)
        {
            
            this.Body = b;
            

            foreach (Fixture f in b.FixtureList)
            {
                f.BeforeCollision += new BeforeCollisionEventHandler(f_BeforeCollision);
            }

            ApplyTexture();

        }
        public WallPopper(Vector2 farseerLoc, World w, RagdollManager r)
        {
            DebugMaterial gray = new DebugMaterial(MaterialType.Blank)
            {
                Color = Color.DarkGray
            };

            body = new Body(w);
            body.Rotation = -(float)Math.PI / 2;
            Vertices popperShape = new Vertices(new Vector2[] {new Vector2(-1.2f, .8f), new Vector2(-1.2f, -.8f), new Vector2(1.2f, -.4f), new Vector2(1.2f, .4f)});
            FixtureFactory.AttachPolygon(popperShape, 1, body, gray);
            body.Position = farseerLoc;
            body.BodyType = BodyType.Dynamic;
            body.IsBullet = true;
            //b.CollidesWith = Category.None;

            Init(w, r);

        }
Exemple #5
0
 public GunTurret(Vector2 farseerLoc, World w, RagdollManager r, Fixture f)
     : base(farseerLoc, w, r, f)
 {
     
 }
Exemple #6
0
 public GunTurret(Vector2 farseerLoc, World w, RagdollManager r)
     : base(farseerLoc, w, r)
 {
 }
 public HazardManager(FarseerManager f, RagdollManager r)
 {
     this.farseerManager = f;
     this.ragdollManager = r;
 }
Exemple #8
0
 protected Pickup(RagdollManager r, FarseerManager f) {
     this.ragdollManager = r;
     this.farseerManager = f;
 }
Exemple #9
0
        public override void Init(World w, RagdollManager r)
        {
            world = w;
            target = r.ragdoll;
            body.setWorld(w);


            IsOperational = true;
            

            state = State.Scanning;
        }
Exemple #10
0
 public Turret(Vector2 farseerLoc, World w, RagdollManager r) : this(farseerLoc, w, r, null)
 {
 }
Exemple #11
0
 public abstract void Init(World w, RagdollManager r);
Exemple #12
0
        public Powerup(RagdollManager r, FarseerManager f) : base(r, f)
        {

        }
Exemple #13
0
        public Powerup(Body b, RagdollManager ragdollManager, FarseerManager farseerManager) : base(b, ragdollManager, farseerManager)
        {

        }
 public PowerupManager(RagdollManager r, FarseerManager f)
 {
     this.ragdollManager = r;
     this.farseerManager = f;
 }
 public LaserTurret(Vector2 farseerLoc, World w, RagdollManager r, Fixture f)
     : base(farseerLoc, w, r, f)
 {
     reloadTime = 50;
 }