示例#1
0
 /// <summary> Refresh information texts. </summary>
 private void RefreshInfoTexts()
 {
     mainInfoText.text =
         "controller count: " + NRInput.GetAvailableControllersCount().ToString() + "\n"
         + "type: " + NRInput.GetControllerType().ToString() + "\n"
         + "current debug hand: " + m_CurrentDebugHand.ToString() + "\n"
         + "position available: " + NRInput.GetControllerAvailableFeature(ControllerAvailableFeature.CONTROLLER_AVAILABLE_FEATURE_POSITION).ToString() + "\n"
         + "rotation available: " + NRInput.GetControllerAvailableFeature(ControllerAvailableFeature.CONTROLLER_AVAILABLE_FEATURE_ROTATION).ToString() + "\n"
         + "gyro available: " + NRInput.GetControllerAvailableFeature(ControllerAvailableFeature.CONTROLLER_AVAILABLE_FEATURE_GYRO).ToString() + "\n"
         + "accel available: " + NRInput.GetControllerAvailableFeature(ControllerAvailableFeature.CONTROLLER_AVAILABLE_FEATURE_ACCEL).ToString() + "\n"
         + "mag available: " + NRInput.GetControllerAvailableFeature(ControllerAvailableFeature.CONTROLLER_AVAILABLE_FEATURE_MAG).ToString() + "\n"
         + "battery available: " + NRInput.GetControllerAvailableFeature(ControllerAvailableFeature.CONTROLLER_AVAILABLE_FEATURE_BATTERY).ToString() + "\n"
         + "vibration available: " + NRInput.GetControllerAvailableFeature(ControllerAvailableFeature.CONTROLLER_AVAILABLE_FEATURE_HAPTIC_VIBRATE).ToString() + "\n"
         + "rotation: " + NRInput.GetRotation(m_CurrentDebugHand).ToString("F3") + "\n"
         + "position: " + NRInput.GetPosition(m_CurrentDebugHand).ToString("F3") + "\n"
         + "touch: " + NRInput.GetTouch(m_CurrentDebugHand).ToString("F3") + "\n"
         + "trigger button: " + NRInput.GetButton(m_CurrentDebugHand, ControllerButton.TRIGGER).ToString() + "\n"
         + "home button: " + NRInput.GetButton(m_CurrentDebugHand, ControllerButton.HOME).ToString() + "\n"
         + "app button: " + NRInput.GetButton(m_CurrentDebugHand, ControllerButton.APP).ToString() + "\n"
         + "grip button: " + NRInput.GetButton(m_CurrentDebugHand, ControllerButton.GRIP).ToString() + "\n"
         + "touchpad button: " + NRInput.GetButton(m_CurrentDebugHand, ControllerButton.TOUCHPAD_BUTTON).ToString() + "\n"
         + "gyro: " + NRInput.GetGyro(m_CurrentDebugHand).ToString("F3") + "\n"
         + "accel: " + NRInput.GetAccel(m_CurrentDebugHand).ToString("F3") + "\n"
         + "mag: " + NRInput.GetMag(m_CurrentDebugHand).ToString("F3") + "\n"
         + "battery: " + NRInput.GetControllerBattery(m_CurrentDebugHand);
     extraInfoText.text = m_ExtraInfoStr;
     //Debug.Log("istouching:" + NRInput.IsTouching() + " value:" + NRInput.GetTouch(m_CurrentDebugHand).ToString("F3"));
     PrintInputState();
 }
示例#2
0
 private void RefreshInfoTexts()
 {
     mainInfoText.text =
         "controller count: " + NRInput.GetAvailableControllersCount().ToString() + "\n"
         + "type: " + NRInput.GetControllerType().ToString() + "\n"
         + "domain hand: " + NRInput.DomainHand.ToString() + "\n"
         + "position available: " + NRInput.GetControllerAvailableFeature(ControllerAvailableFeature.CONTROLLER_AVAILABLE_FEATURE_POSITION).ToString() + "\n"
         + "rotation available: " + NRInput.GetControllerAvailableFeature(ControllerAvailableFeature.CONTROLLER_AVAILABLE_FEATURE_ROTATION).ToString() + "\n"
         + "gyro available: " + NRInput.GetControllerAvailableFeature(ControllerAvailableFeature.CONTROLLER_AVAILABLE_FEATURE_GYRO).ToString() + "\n"
         + "accel available: " + NRInput.GetControllerAvailableFeature(ControllerAvailableFeature.CONTROLLER_AVAILABLE_FEATURE_ACCEL).ToString() + "\n"
         + "mag available: " + NRInput.GetControllerAvailableFeature(ControllerAvailableFeature.CONTROLLER_AVAILABLE_FEATURE_MAG).ToString() + "\n"
         + "battery available: " + NRInput.GetControllerAvailableFeature(ControllerAvailableFeature.CONTROLLER_AVAILABLE_FEATURE_BATTERY).ToString() + "\n"
         + "vibration available: " + NRInput.GetControllerAvailableFeature(ControllerAvailableFeature.CONTROLLER_AVAILABLE_FEATURE_HAPTIC_VIBRATE).ToString() + "\n"
         + "rotation: " + NRInput.GetRotation().ToString("F3") + "\n"
         + "position: " + NRInput.GetPosition().ToString("F3") + "\n"
         + "touch: " + NRInput.GetTouch().ToString("F3") + "\n"
         + "trigger, home, app: " + NRInput.GetButton(ControllerButton.TRIGGER).ToString() + NRInput.GetButton(ControllerButton.HOME).ToString() + NRInput.GetButton(ControllerButton.APP).ToString() + "\n"
         + "gyro: " + NRInput.GetGyro().ToString("F3") + "\n"
         + "accel: " + NRInput.GetAccel().ToString("F3") + "\n"
         + "mag: " + NRInput.GetMag().ToString("F3") + "\n"
         + "battery: " + NRInput.GetControllerBattery();
     extraInfoText.text = m_ExtraInfoStr;
 }