Example #1
0
 /// <summary> Updates this object. </summary>
 void Update()
 {
     if (vibrationButtons == null || vibrationButtons.Length == 0)
     {
         return;
     }
     for (int i = 0; i < vibrationButtons.Length; i++)
     {
         if (NRInput.GetButtonDown(ControllerHandEnum.Right, vibrationButtons[i]))
         {
             NRInput.TriggerHapticVibration(ControllerHandEnum.Right, vibrationTime);
         }
         if (NRInput.GetButtonDown(ControllerHandEnum.Left, vibrationButtons[i]))
         {
             NRInput.TriggerHapticVibration(ControllerHandEnum.Left, vibrationTime);
         }
     }
 }
Example #2
0
        private void Update()
        {
            if (NRInput.GetButtonDown(ControllerButton.TRIGGER))
            {
                NRInput.TriggerHapticVibration(0.5f);
                AddExtraInfo("trigger_btn_down");
            }

            if (NRInput.GetButtonDown(ControllerButton.HOME))
            {
                AddExtraInfo("home_btn_down");
            }

            if (NRInput.GetButtonDown(ControllerButton.APP))
            {
                AddExtraInfo("app_btn_down");
            }

            if (NRInput.GetButtonUp(ControllerButton.TRIGGER))
            {
                AddExtraInfo("trigger_btn_up");
            }

            if (NRInput.GetButtonUp(ControllerButton.HOME))
            {
                AddExtraInfo("home_btn_up");
            }

            if (NRInput.GetButtonUp(ControllerButton.APP))
            {
                AddExtraInfo("app_btn_up");
            }

            FollowMainCam();
            RefreshInfoTexts();
        }
Example #3
0
 void IInputController.TriggerHapticVibration(HapticData data)
 {
     NRInput.TriggerHapticVibration(data.DurationSeconds, data.Frequency, data.Amplitude);
 }