Exemplo n.º 1
0
 async void handHeldController_StateChanged(object sender, XboxControllerStateChangedEventArgs e)
 {
     if (null != panTilt && null != firingControl)
     {
         await UserInputControl.HandleInput(this, panTilt, firingControl, null, this.handHeldController);
     }
 }
Exemplo n.º 2
0
        //Some way of using the controller
        // An event handler
        // Takes in XInput.Event args
        //  if (b.Key == XInput.Controller.Key."B")
        //  { this.trackingMode = TrackingMode.SKELETAL
        //    AudioViewBox.Visisbility = Visibility.Hidden;


        /// <summary>
        /// Handles an 'controller' actions using the keyboard interface
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        async void MainWindow_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
        {
            //passing the xbox controller here effectivley makes the xbox control able to override the keyboard
            await UserInputControl.HandleInput(this, panTilt, firingControl, e.Key, this.handHeldController);
        }