Ejemplo n.º 1
0
        /// <summary>
        /// Computes the movement of the camera in 3D space for this frame.
        /// </summary>
        private void Calculate2DMovement()
        {
            var mouseX = Mouse.GetCursorState().X;
            var mouseY = Mouse.GetCursorState().Y;

            float deltaMouseX = this.InitialMouseX - mouseX;
            float deltaMouseY = this.InitialMouseY - mouseY;

            _movement.Calculate2DMovement(deltaMouseX, deltaMouseY, this.DeltaTime);

            // Update the initial location for the next frame
            this.InitialMouseX = mouseX;
            this.InitialMouseY = mouseY;
        }