Esempio n. 1
0
        public override bool Update(long nowMicros, int diffMicros)
        {
            cameraSpinRotationControl.Update(Keyboard, ref cameraSpinRotation);
            cameraOverheadRotationControl.Update(Keyboard, ref cameraOverheadRotation);


            return(false);
        }
Esempio n. 2
0
        protected override void Update(GameTime gameTime)
        {
            // Allows the game to exit
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
            {
                this.Exit();
            }

            //
            // Update Grid
            //
            worldGrid.Update();


            //
            // Update animations
            //
            octahedronWorld *= Matrix.CreateRotationX(.05f) * Matrix.CreateRotationZ(.01f);

            icosahedronWorldRotation *= Matrix.CreateRotationX(.05f) * Matrix.CreateRotationZ(.01f);


            //
            // Get Controls
            //
            KeyboardState keyboardState = Keyboard.GetState();
            MouseState    mouseState    = Mouse.GetState();



            //
            // Update helicopter
            //
            tailRotorAngle -= .15f;
            mainRotorAngle -= .15f;

            leftRightControl.Update(keyboardState, ref helicopterLeftRight);
            forwardBackwardControl.Update(keyboardState, ref helicopterFowardBackward);
            upDownControl.Update(keyboardState, ref helicopterUpDown);
        }