Beispiel #1
0
        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            // Allows the game to exit
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
                this.Exit();

            var keyboardState = Keyboard.GetState();
            if (keyboardState.IsKeyDown(Keys.F1))
                skeleton = skeleton1;
            if (keyboardState.IsKeyDown(Keys.F2))
                skeleton = skeleton2;

            // TODO: Add your update logic here

            base.Update(gameTime);
        }
Beispiel #2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            model = Content.Load<Model>("Fiend\\FIEND.MESH");
            skeleton1 = Content.Load<Skeleton>("Fiend\\FIEND.SKELETON");
            skeleton1.CopyModelBindpose(model);
            skeleton2 = Content.Load<Skeleton>("Fiend\\IDLE.SKELETON");
            skeleton2.CopyModelBindpose(model);
            //model = Content.Load<Model>("HUM_M.MESH");
            //skeleton1 = Content.Load<Skeleton>("IDLE.SKELETON");
            //skeleton1.CopyModelBindpose(model);
            //skeleton2 = Content.Load<Skeleton>("RUN.SKELETON");
            //skeleton2.CopyModelBindpose(model);
            //model = Content.Load<Model>("robot.mesh");
            //skeleton1 = Content.Load<Skeleton>("robot.skeleton");
            //skeleton1.CopyModelBindpose(model);
            //skeleton2 = Content.Load<Skeleton>("robot.skeleton");
            //skeleton2.CopyModelBindpose(model);

            skeleton = skeleton1;
        }