コード例 #1
0
        static void Postfix(ref float __result)
        {
            if (VRControls.mainControlsActive)
            {
                var joystick = VRControls.instance.GetJoyRightStickY();

                isRunning   = joystick < (VHVRConfig.ToggleRun() ? TOGGLE_RUN_SENSITIVITY : NON_TOGGLE_RUN_SENSITIVITY);
                isCrouching = joystick > CROUCH_SENSITIVITY;

                __result = __result + joystick;
            }
        }
コード例 #2
0
 static void Prefix(Player __instance, ref bool run)
 {
     if (__instance != Player.m_localPlayer || !VHVRConfig.UseVrControls())
     {
         return;
     }
     if (VHVRConfig.ToggleRun())
     {
         handleRunToggle(ref run);
     }
     else
     {
         run = ZInput_GetJoyRightStickY_Patch.isRunning;
     }
 }