Пример #1
0
        public override void Init(KinectRagdollGame g)
        {
            this.stopwatch    = new Stopwatch();
            body.OnCollision += ObjectiveTouched;

            base.Init(g);
        }
Пример #2
0
 public ObjectiveManager(KinectRagdollGame game)
 {
     countdown = new Stopwatch();
     countup = new Stopwatch();
     bleedout = new Stopwatch();
     this.game = game;
 }
Пример #3
0
 public ObjectiveManager(KinectRagdollGame game)
 {
     countdown = new Stopwatch();
     countup   = new Stopwatch();
     bleedout  = new Stopwatch();
     this.game = game;
 }
Пример #4
0
 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;
 }
Пример #5
0
        public FarseerManager(bool main, KinectRagdollGame game)
        {
            //world.ContactManager = new ContactManager();

            world = new World(new Vector2(0, -20));



            debugview       = new DebugViewXNA(world);
            debugview.Flags = FarseerPhysics.DebugViewFlags.TexturedShape | FarseerPhysics.DebugViewFlags.RagdollCustom;

            //World loaded = Serializer.readFromDataContract("graph.xml");
            //world.JointList.AddRange(loaded.JointList);
            //world.BodyList.AddRange(loaded.BodyList);



            this.game = game;
            //world = new World(new Vector2(0, 0));



            rand = new Random();

            if (main)
            {
                Main = this;
            }
        }
Пример #6
0
        public FarseerManager(bool main, KinectRagdollGame game)
        {
            
            //world.ContactManager = new ContactManager();

            world = new World(new Vector2(0, -20));

            

            debugview = new DebugViewXNA(world);
            debugview.Flags = FarseerPhysics.DebugViewFlags.TexturedShape | FarseerPhysics.DebugViewFlags.RagdollCustom;

            //World loaded = Serializer.readFromDataContract("graph.xml");
            //world.JointList.AddRange(loaded.JointList);
            //world.BodyList.AddRange(loaded.BodyList);

            


            this.game = game;
            //world = new World(new Vector2(0, 0));
            
            




            rand = new Random();

            if (main)
            {
                Main = this;
            }

        }
Пример #7
0
        public override void Init(KinectRagdollGame g)
        {

            this.stopwatch = new Stopwatch();
            body.OnCollision += ObjectiveTouched;
            
            base.Init(g);
        }
Пример #8
0
        public StopwatchObjective(KinectRagdollGame g, Body b)
            : base(g)
        {
            this.body = b;

            FarseerTextures.ApplyTexture(b, FarseerTextures.TextureType.Objective);

            Init(g);
        }
Пример #9
0
        public StopwatchObjective(KinectRagdollGame g, Body b)
            : base(g)
        {
            this.body = b;

            FarseerTextures.ApplyTexture(b, FarseerTextures.TextureType.Objective);

            Init(g);
        }
Пример #10
0
        //private int BUTTON_PADDING = 5;

        public Toolbox(KinectRagdollGame game)
        {
            this.game = game;

            toolMappings   = new Dictionary <ToolboxButton, Tool>();
            actionMappings = new Dictionary <ToolboxButton, ClickAction>();
            buttons        = new List <ToolboxButton>();

            Position = new Vector2(0, 0);
        }
Пример #11
0
        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;
            

        }
Пример #12
0
        private static void KillMouseJoints(World w, KinectRagdollGame g)
        {
            List<FixedMouseJoint> mjs = new List<FixedMouseJoint>();

            foreach (Joint j in w.JointList)
            {
                if (j is FixedMouseJoint) w.RemoveJoint(j);
            }

            w.ProcessChanges();
        }
Пример #13
0
        private static void KillMouseJoints(World w, KinectRagdollGame g)
        {
            List <FixedMouseJoint> mjs = new List <FixedMouseJoint>();

            foreach (Joint j in w.JointList)
            {
                if (j is FixedMouseJoint)
                {
                    w.RemoveJoint(j);
                }
            }

            w.ProcessChanges();
        }
Пример #14
0
        public static void Save(World w, KinectRagdollGame g, String filename)
        {

            KillMouseJoints(w, g);


            FileStream writer = new FileStream(filename, FileMode.Create);

            SaveFile sf = new SaveFile();
            foreach (Body b in w.BodyList) {
                //if (!g.ragdollManager.OwnsBody(b))
                //{
                    sf.bodyList.Add(b);
                //}
            }

            foreach (Joint j in w.JointList)
            {
                if (!g.ragdollManager.OwnsJoint(j))
                {
                    sf.jointList.Add(j);
                }
            }
            
            
            sf.gravity = w.Gravity;

            sf.ragdoll = g.ragdollManager.ragdoll;

            sf.objectives = g.objectiveManager.objectives;

            sf.powerups = g.powerupManager.Powerups;

            sf.hazards = g.hazardManager.Hazards;

            WriteSaveFile(writer, sf);

        }
Пример #15
0
        public static void Save(World w, KinectRagdollGame g, String filename)
        {
            KillMouseJoints(w, g);


            FileStream writer = new FileStream(filename, FileMode.Create);

            SaveFile sf = new SaveFile();

            foreach (Body b in w.BodyList)
            {
                //if (!g.ragdollManager.OwnsBody(b))
                //{
                sf.bodyList.Add(b);
                //}
            }

            foreach (Joint j in w.JointList)
            {
                if (!g.ragdollManager.OwnsJoint(j))
                {
                    sf.jointList.Add(j);
                }
            }


            sf.gravity = w.Gravity;

            sf.ragdoll = g.ragdollManager.ragdoll;

            sf.objectives = g.objectiveManager.objectives;

            sf.powerups = g.powerupManager.Powerups;

            sf.hazards = g.hazardManager.Hazards;

            WriteSaveFile(writer, sf);
        }
Пример #16
0
 public RectangleTool(KinectRagdollGame game) : base(game)
 {
 }
Пример #17
0
        public WallPopperTool(KinectRagdollGame game) : base(game)
        {

        }
Пример #18
0
 public RectangleTool(KinectRagdollGame game) : base(game)
 {
     
 }
Пример #19
0
 public PointerTool(KinectRagdollGame game, Texture2D selectionRec)
     : base(game)
 {
     this.selectionRec = selectionRec;
     game.farseerManager.world.FixtureRemoved += checkSavedFixtureRemoval;
 }
Пример #20
0
        public JointTool(KinectRagdollGame game) : base(game)
        {

        }
Пример #21
0
 public CircleTool(KinectRagdollGame game) : base(game)
 {
 }
Пример #22
0
        public Objective(KinectRagdollGame g)
        {
            this.game = g;

        }
Пример #23
0
        public PowerupForm()
        {
            InitializeComponent();

            game = KinectRagdollGame.Main;
        }
Пример #24
0
        //private DragArea d;


        public DraggedTool(KinectRagdollGame game) : base(game)
        {
        }
Пример #25
0
 public PolygonTool(KinectRagdollGame game)
     : base(game)
 {
 }
Пример #26
0
 public ActionCenter(KinectRagdollGame game)
 {
     this.game = game;
 }
Пример #27
0
 public WallPopperTool(KinectRagdollGame game) : base(game)
 {
 }
Пример #28
0
 /// <summary>
 /// Call this after you deserialize an objective.
 /// </summary>
 /// <param name="g"></param>
 public virtual void Init(KinectRagdollGame g)
 {
     this.game = g;
 }
Пример #29
0
 public Objective(KinectRagdollGame g)
 {
     this.game = g;
 }
Пример #30
0
 /// <summary>
 /// Call this after you deserialize an objective.
 /// </summary>
 /// <param name="g"></param>
 public virtual void Init(KinectRagdollGame g)
 {
     this.game = g;
 }
Пример #31
0
        public PowerupForm()
        {
            InitializeComponent();

            game = KinectRagdollGame.Main;
        }
Пример #32
0
 public JointTool(KinectRagdollGame game) : base(game)
 {
 }
Пример #33
0
 public InputManager(KinectRagdollGame game)
 {
     this.game = game;
     inputHelper = new InputHelper();
 }
Пример #34
0
 public RocketTurretTool(KinectRagdollGame game)
     : base(game)
 {
 }
Пример #35
0
 public PointerTool(KinectRagdollGame game, Texture2D selectionRec)
     : base(game)
 {
     this.selectionRec = selectionRec;
     game.farseerManager.world.FixtureRemoved += checkSavedFixtureRemoval;
 }
Пример #36
0
        public ObjectiveTool(KinectRagdollGame g)
            : base(g)
        {

        }
Пример #37
0
        public RopeTool(KinectRagdollGame game)
            : base(game)
        {

        }
Пример #38
0
 public Tool(KinectRagdollGame game)
 {
     this.game = game;
 }
Пример #39
0
 public RopeTool(KinectRagdollGame game)
     : base(game)
 {
 }
Пример #40
0
        public RocketTurretTool(KinectRagdollGame game)
            : base(game)
        {

        }
Пример #41
0
        public GunTurretTool(KinectRagdollGame game) : base(game)
        {

        }
Пример #42
0
 public InputManager(KinectRagdollGame game)
 {
     this.game   = game;
     inputHelper = new InputHelper();
 }
Пример #43
0
 public LaserTurretTool(KinectRagdollGame game) : base(game)
 {
 }
Пример #44
0
 public ActionCenter(KinectRagdollGame game)
 {
     this.game = game;
 }
Пример #45
0
 public ObjectiveTool(KinectRagdollGame g)
     : base(g)
 {
 }
Пример #46
0
 public NailTool(KinectRagdollGame game)
     : base(game)
 {
 }
Пример #47
0
 public CircleTool(KinectRagdollGame game) : base(game)
 {
 }
Пример #48
0
 public static void SetGame(KinectRagdollGame game)
 {
     FarseerTextures.game = game;
 }
Пример #49
0
 public static void SetGame(KinectRagdollGame game)
 {
     FarseerTextures.game = game;
 }
Пример #50
0
        public PolygonTool(KinectRagdollGame game)
            : base(game)
        {

        }