265 lines
9.6 KiB
C#
265 lines
9.6 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using Cpp2IlInjected;
|
|
using UnityEngine;
|
|
using Valve.VR;
|
|
|
|
namespace RecRoom.Inputs
|
|
{
|
|
// Token: 0x020022B8 RID: 8888
|
|
[Token(Token = "0x20022B8")]
|
|
[Serializable]
|
|
[StructLayout(3)]
|
|
public class SteamVrViveVRInputHandler : SteamVrInputHandler
|
|
{
|
|
// Token: 0x0600F3E1 RID: 62433 RVA: 0x0039B2A0 File Offset: 0x003994A0
|
|
[Token(Token = "0x600F3E1")]
|
|
[Address(RVA = "0x10D0F10", Offset = "0x10CF910", VA = "0x1810D0F10", Slot = "11")]
|
|
protected override void GCGIMANBGKD(ref VRInputHandler.EFAKPOCFMPC GKNIHNHGBKC)
|
|
{
|
|
bool flag3;
|
|
Vector2 vector3;
|
|
do
|
|
{
|
|
VRTrackedController.PJJMKFHNMMM <HandType>k__BackingField = this.<HandType>k__BackingField;
|
|
bool flag;
|
|
if (!flag)
|
|
{
|
|
return;
|
|
}
|
|
SteamVR_Action_Boolean rotateTouchButtonAction = this.RotateTouchButtonAction;
|
|
SteamVR_Action_Boolean rotatePressButtonAction = this.RotatePressButtonAction;
|
|
SteamVR_Action_Boolean menuButtonAction = this.MenuButtonAction;
|
|
GKNIHNHGBKC.BDDMHHDKLHE = menuButtonAction;
|
|
bool flag2;
|
|
GKNIHNHGBKC.BDDMHHDKLHE.GPGHKKMCFIF = flag2;
|
|
SteamVR_Action_Vector2 rotateAxisAction = this.RotateAxisAction;
|
|
Axis2DSettings rotateAxisSettings = this.RotateAxisSettings;
|
|
if (rotateAxisSettings != 0)
|
|
{
|
|
Vector2 vector2;
|
|
Vector2 vector = rotateAxisSettings.IPIAGFNHIGM(vector2);
|
|
}
|
|
if (SingletonMonoBehaviour.Instance.CLCFPGIILFA)
|
|
{
|
|
LocalPlayerController instance = SingletonMonoBehaviour.Instance;
|
|
if (instance.FGAMGPEBMGE == LocalPlayerController.JJKKCDNKBJI.VR_TELEPORT)
|
|
{
|
|
GKNIHNHGBKC.KJDKBHKNHPD = instance;
|
|
GKNIHNHGBKC.KJDKBHKNHPD.GPGHKKMCFIF = flag3;
|
|
this.touchDownInDeadZone = rotateAxisSettings != null;
|
|
}
|
|
}
|
|
SteamVR_Action_Boolean teleportButtonAction = this.TeleportButtonAction;
|
|
GKNIHNHGBKC.KJDKBHKNHPD = teleportButtonAction;
|
|
bool flag4;
|
|
GKNIHNHGBKC.KJDKBHKNHPD.GPGHKKMCFIF = flag4;
|
|
this.touchDownInDeadZone = false;
|
|
SteamVR_Action_Vector2 walkAxisAction = this.WalkAxisAction;
|
|
Axis2DSettings walkAxisSettings = this.WalkAxisSettings;
|
|
if (walkAxisSettings != 0)
|
|
{
|
|
Vector2 vector4;
|
|
vector3 = walkAxisSettings.IPIAGFNHIGM(vector4);
|
|
}
|
|
}
|
|
while (!flag3);
|
|
if (0 == 0)
|
|
{
|
|
}
|
|
int num = 0;
|
|
if (vector3 != 0)
|
|
{
|
|
}
|
|
AxisSwipeButtons rotateAxisSwipeButtons = this.RotateAxisSwipeButtons;
|
|
AxisSwipeButtons.MGGKDBHMJDF <SwipeState>k__BackingField = rotateAxisSwipeButtons.<SwipeState>k__BackingField;
|
|
this.lastSwipeState = <SwipeState>k__BackingField;
|
|
float y = GKNIHNHGBKC.ANEEPNBJPKK.y;
|
|
string text = rotateAxisSwipeButtons.ToString();
|
|
AxisSwipeButtons.MGGKDBHMJDF <SwipeState>k__BackingField2 = this.RotateAxisSwipeButtons.<SwipeState>k__BackingField;
|
|
this.currentSwipeState = <SwipeState>k__BackingField2;
|
|
if (SingletonMonoBehaviour.Instance.CLCFPGIILFA)
|
|
{
|
|
uint num2;
|
|
if (num2 != (uint)0)
|
|
{
|
|
AxisSwipeButtons.MGGKDBHMJDF mggkdbhmjdf = this.currentSwipeState;
|
|
if (mggkdbhmjdf != AxisSwipeButtons.MGGKDBHMJDF.Touch && mggkdbhmjdf != AxisSwipeButtons.MGGKDBHMJDF.None)
|
|
{
|
|
goto IL_17D;
|
|
}
|
|
}
|
|
AxisSwipeButtons.MGGKDBHMJDF mggkdbhmjdf2 = this.lastSwipeState;
|
|
AxisSwipeButtons.MGGKDBHMJDF mggkdbhmjdf3 = this.currentSwipeState;
|
|
if (mggkdbhmjdf2 == mggkdbhmjdf3)
|
|
{
|
|
goto IL_1A5;
|
|
}
|
|
if (mggkdbhmjdf3 == AxisSwipeButtons.MGGKDBHMJDF.Touch)
|
|
{
|
|
goto IL_191;
|
|
}
|
|
if (mggkdbhmjdf2 != AxisSwipeButtons.MGGKDBHMJDF.Touch || mggkdbhmjdf3 != AxisSwipeButtons.MGGKDBHMJDF.None)
|
|
{
|
|
goto IL_1A5;
|
|
}
|
|
IL_17D:
|
|
GKNIHNHGBKC.KJDKBHKNHPD = num;
|
|
GKNIHNHGBKC.KJDKBHKNHPD.GPGHKKMCFIF = true;
|
|
IL_191:
|
|
GKNIHNHGBKC.KJDKBHKNHPD = mggkdbhmjdf3;
|
|
GKNIHNHGBKC.KJDKBHKNHPD.GPGHKKMCFIF = false;
|
|
}
|
|
IL_1A5:
|
|
FDKPONPCGGC fdkponpcggc;
|
|
bool gpghkkmcfif = fdkponpcggc.GPGHKKMCFIF;
|
|
GKNIHNHGBKC.ALFHDHKHNHH.GPGHKKMCFIF = gpghkkmcfif;
|
|
FDKPONPCGGC fdkponpcggc2;
|
|
bool gpghkkmcfif2 = fdkponpcggc2.GPGHKKMCFIF;
|
|
GKNIHNHGBKC.JOOMEAKJBIJ.GPGHKKMCFIF = gpghkkmcfif2;
|
|
FDKPONPCGGC fdkponpcggc3;
|
|
bool gpghkkmcfif3 = fdkponpcggc3.GPGHKKMCFIF;
|
|
GKNIHNHGBKC.PKLBADMDPMA.GPGHKKMCFIF = gpghkkmcfif3;
|
|
SteamVR_Action_Boolean pushToTalkButtonAction = this.PushToTalkButtonAction;
|
|
GKNIHNHGBKC.LGFOEBJPDKA = pushToTalkButtonAction;
|
|
bool flag5;
|
|
GKNIHNHGBKC.LGFOEBJPDKA.GPGHKKMCFIF = flag5;
|
|
SteamVR_Action_Boolean gripTurnButtonAction = this.GripTurnButtonAction;
|
|
GKNIHNHGBKC.MLHDMEMGHEO = gripTurnButtonAction;
|
|
bool flag6;
|
|
GKNIHNHGBKC.MLHDMEMGHEO.GPGHKKMCFIF = flag6;
|
|
SteamVR_Action_Boolean selfScaleButtonAction = this.SelfScaleButtonAction;
|
|
GKNIHNHGBKC.GODIAMIEPJG = selfScaleButtonAction;
|
|
bool flag7;
|
|
GKNIHNHGBKC.GODIAMIEPJG.GPGHKKMCFIF = flag7;
|
|
SteamVR_Action_Single pickupAxisAction = this.PickupAxisAction;
|
|
SteamVR_Action_Single handOpenCloseAxisAction = this.HandOpenCloseAxisAction;
|
|
float num3;
|
|
GKNIHNHGBKC.BDLBPMGCPEE = num3;
|
|
GKNIHNHGBKC.BDLBPMGCPEE.JIBLKPMDPOF = (float)num;
|
|
SteamVR_Action_Vector2 smoothRotateAxisAction = this.SmoothRotateAxisAction;
|
|
Axis2DSettings smoothSwipeRotateAxisSettings = this.SmoothSwipeRotateAxisSettings;
|
|
if (smoothSwipeRotateAxisSettings != 0)
|
|
{
|
|
Vector2 vector6;
|
|
Vector2 vector5 = smoothSwipeRotateAxisSettings.IPIAGFNHIGM(vector6);
|
|
}
|
|
GKNIHNHGBKC.EJAJMANMAFG = num3;
|
|
GKNIHNHGBKC.EJAJMANMAFG.y = y;
|
|
SteamVR_Action_Boolean sprintButtonAction = this.SprintButtonAction;
|
|
GKNIHNHGBKC.EHKHLEFKJND = sprintButtonAction;
|
|
bool flag8;
|
|
GKNIHNHGBKC.EHKHLEFKJND.GPGHKKMCFIF = flag8;
|
|
SteamVR_Action_Boolean slideButtonAction = this.SlideButtonAction;
|
|
GKNIHNHGBKC.KCEKNHAKHGA = slideButtonAction;
|
|
bool flag9;
|
|
GKNIHNHGBKC.KCEKNHAKHGA.GPGHKKMCFIF = flag9;
|
|
SteamVR_Action_Boolean selfScaleButtonAction2 = this.SelfScaleButtonAction;
|
|
GKNIHNHGBKC.HMPJMBEFGMM = selfScaleButtonAction2;
|
|
bool flag10;
|
|
GKNIHNHGBKC.HMPJMBEFGMM.GPGHKKMCFIF = flag10;
|
|
SteamVR_Action_Single triggerAxisAction = this.TriggerAxisAction;
|
|
float num4;
|
|
GKNIHNHGBKC.LOKMOOGCDHI = num4;
|
|
GKNIHNHGBKC.LOKMOOGCDHI.JIBLKPMDPOF = (float)num;
|
|
DeprecatedAxisSettings triggerSettings = this.TriggerSettings;
|
|
float num5 = DeprecatedAxisSettings.DAPOOKKDMKB(num4, triggerSettings);
|
|
GKNIHNHGBKC.PHIKDNMBFDL = num5;
|
|
SteamVR_Action_Single triggerAxisAction2 = this.TriggerAxisAction;
|
|
float num6;
|
|
GKNIHNHGBKC.MMIGCAIKDOB = num6;
|
|
GKNIHNHGBKC.MMIGCAIKDOB.JIBLKPMDPOF = (float)num;
|
|
SteamVR_Action_Vector2 rotateAxisAction2 = this.RotateAxisAction;
|
|
Axis2DSettings rotateAxisSettings2 = this.RotateAxisSettings;
|
|
if (rotateAxisSettings2 != 0)
|
|
{
|
|
Vector2 vector8;
|
|
Vector2 vector7 = rotateAxisSettings2.IPIAGFNHIGM(vector8);
|
|
}
|
|
GKNIHNHGBKC.JBKKAKDEGHJ = num6;
|
|
GKNIHNHGBKC.JBKKAKDEGHJ.y = y;
|
|
SteamVR_Action_Boolean pushToTalkButtonAction2 = this.PushToTalkButtonAction;
|
|
GKNIHNHGBKC.BIOLPKIKBMN = pushToTalkButtonAction2;
|
|
bool flag11;
|
|
GKNIHNHGBKC.BIOLPKIKBMN.GPGHKKMCFIF = flag11;
|
|
if (Time.frameCount > 30)
|
|
{
|
|
int frameCount = Time.frameCount;
|
|
SteamVR_Action_Vibration haptics = this.haptics;
|
|
this.lastHapticFrame = frameCount;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600F3E2 RID: 62434 RVA: 0x0039B674 File Offset: 0x00399874
|
|
[Token(Token = "0x600F3E2")]
|
|
[Address(RVA = "0x10D1810", Offset = "0x10D0210", VA = "0x1810D1810", Slot = "9")]
|
|
protected override void OAPPNDCDEJC(float LAIPKAHGIJF, bool OBDMPHDGBLG)
|
|
{
|
|
VRTrackedController.PJJMKFHNMMM <HandType>k__BackingField = this.<HandType>k__BackingField;
|
|
bool flag;
|
|
if (flag)
|
|
{
|
|
float num = Mathf.Lerp((float)0, 320f, LAIPKAHGIJF);
|
|
float deltaTime = Time.deltaTime;
|
|
SteamVR_Action_Vibration haptics = this.haptics;
|
|
}
|
|
int frameCount = Time.frameCount;
|
|
this.lastHapticFrame = frameCount;
|
|
}
|
|
|
|
// Token: 0x0600F3E3 RID: 62435 RVA: 0x0039B6C8 File Offset: 0x003998C8
|
|
[Token(Token = "0x600F3E3")]
|
|
[Address(RVA = "0x10D1900", Offset = "0x10D0300", VA = "0x1810D1900")]
|
|
public SteamVrViveVRInputHandler()
|
|
{
|
|
int num = 0;
|
|
SteamVR_Action_Boolean booleanAction = SteamVR_Input.GetBooleanAction("RotateAxisTouch", num != 0);
|
|
this.RotateTouchButtonAction = booleanAction;
|
|
int num2 = 0;
|
|
SteamVR_Action_Boolean booleanAction2 = SteamVR_Input.GetBooleanAction("RotateAxisPress", num2 != 0);
|
|
this.RotatePressButtonAction = booleanAction2;
|
|
base..ctor();
|
|
}
|
|
|
|
// Token: 0x0400A34E RID: 41806
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x270")]
|
|
[Token(Token = "0x400A34E")]
|
|
private SteamVR_Action_Boolean RotateTouchButtonAction;
|
|
|
|
// Token: 0x0400A34F RID: 41807
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x278")]
|
|
[Token(Token = "0x400A34F")]
|
|
private SteamVR_Action_Boolean RotatePressButtonAction;
|
|
|
|
// Token: 0x0400A350 RID: 41808
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x280")]
|
|
[Token(Token = "0x400A350")]
|
|
[Header("Vive Swipe buttons")]
|
|
public AxisSwipeButtons RotateAxisSwipeButtons;
|
|
|
|
// Token: 0x0400A351 RID: 41809
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x288")]
|
|
[Token(Token = "0x400A351")]
|
|
private bool touchDownInDeadZone;
|
|
|
|
// Token: 0x0400A352 RID: 41810
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28C")]
|
|
[Token(Token = "0x400A352")]
|
|
private AxisSwipeButtons.MGGKDBHMJDF lastSwipeState;
|
|
|
|
// Token: 0x0400A353 RID: 41811
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x290")]
|
|
[Token(Token = "0x400A353")]
|
|
private AxisSwipeButtons.MGGKDBHMJDF currentSwipeState;
|
|
|
|
// Token: 0x0400A354 RID: 41812
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x294")]
|
|
[Token(Token = "0x400A354")]
|
|
private int lastHapticFrame;
|
|
|
|
// Token: 0x0400A355 RID: 41813
|
|
[Token(Token = "0x400A355")]
|
|
private const int HAPTIC_REFRESH_FRAMES = 30;
|
|
}
|
|
}
|