242 lines
8.8 KiB
C#
242 lines
8.8 KiB
C#
using System;
|
|
using Cpp2IlInjected;
|
|
using UnityEngine;
|
|
using Valve.VR;
|
|
|
|
namespace RecRoom.Inputs
|
|
{
|
|
// Token: 0x020024F0 RID: 9456
|
|
[Token(Token = "0x20024F0")]
|
|
[Serializable]
|
|
public class SteamVrViveVRInputHandler : SteamVrInputHandler
|
|
{
|
|
// Token: 0x0600F319 RID: 62233 RVA: 0x0037E12C File Offset: 0x0037C32C
|
|
[Token(Token = "0x600F319")]
|
|
[Address(RVA = "0xFBAF80", Offset = "0xFB9D80", VA = "0x180FBAF80", Slot = "11")]
|
|
protected override void GCGIMANBGKD(ref VRInputHandler.EFAKPOCFMPC GKNIHNHGBKC)
|
|
{
|
|
VRTrackedController.PJJMKFHNMMM <HandType>k__BackingField = this.<HandType>k__BackingField;
|
|
bool flag;
|
|
if (flag)
|
|
{
|
|
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;
|
|
Axis2DSettings rotateAxisSettings = this.RotateAxisSettings;
|
|
KHINMMJIENE khinmmjiene;
|
|
bool flag3;
|
|
if (khinmmjiene != 0)
|
|
{
|
|
LocalPlayerController instance = SingletonMonoBehaviour.ONCPNMDGGKG;
|
|
if (instance.FGAMGPEBMGE == LocalPlayerController.JJKKCDNKBJI.VR_TELEPORT)
|
|
{
|
|
GKNIHNHGBKC.KJDKBHKNHPD = instance;
|
|
GKNIHNHGBKC.KJDKBHKNHPD.GPGHKKMCFIF = flag3;
|
|
this.touchDownInDeadZone = menuButtonAction != null;
|
|
}
|
|
}
|
|
SteamVR_Action_Boolean teleportButtonAction = this.TeleportButtonAction;
|
|
GKNIHNHGBKC.KJDKBHKNHPD = teleportButtonAction;
|
|
bool flag4;
|
|
GKNIHNHGBKC.KJDKBHKNHPD.GPGHKKMCFIF = flag4;
|
|
this.touchDownInDeadZone = false;
|
|
Axis2DSettings scrollAxisSettings = this.ScrollAxisSettings;
|
|
float num;
|
|
GKNIHNHGBKC.EJNHOLPHCIH = num;
|
|
Axis2DSettings walkAxisSettings = this.WalkAxisSettings;
|
|
Vector2 vector;
|
|
GKNIHNHGBKC.IJBDGFLBADI = vector;
|
|
GKNIHNHGBKC.IJBDGFLBADI.y = num;
|
|
bool flag5;
|
|
if (flag3 || !flag5)
|
|
{
|
|
}
|
|
int num2 = 0;
|
|
if (vector != 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;
|
|
KHINMMJIENE khinmmjiene2;
|
|
if (khinmmjiene2 != 0)
|
|
{
|
|
bool flag6;
|
|
if (flag6)
|
|
{
|
|
AxisSwipeButtons.MGGKDBHMJDF mggkdbhmjdf = this.currentSwipeState;
|
|
if (mggkdbhmjdf != AxisSwipeButtons.MGGKDBHMJDF.Touch && mggkdbhmjdf != AxisSwipeButtons.MGGKDBHMJDF.None)
|
|
{
|
|
goto IL_168;
|
|
}
|
|
}
|
|
AxisSwipeButtons.MGGKDBHMJDF mggkdbhmjdf2 = this.lastSwipeState;
|
|
AxisSwipeButtons.MGGKDBHMJDF mggkdbhmjdf3 = this.currentSwipeState;
|
|
if (mggkdbhmjdf2 == mggkdbhmjdf3)
|
|
{
|
|
goto IL_190;
|
|
}
|
|
if (mggkdbhmjdf3 == AxisSwipeButtons.MGGKDBHMJDF.Touch)
|
|
{
|
|
goto IL_17C;
|
|
}
|
|
if (mggkdbhmjdf2 != AxisSwipeButtons.MGGKDBHMJDF.Touch || mggkdbhmjdf3 != AxisSwipeButtons.MGGKDBHMJDF.None)
|
|
{
|
|
goto IL_190;
|
|
}
|
|
IL_168:
|
|
GKNIHNHGBKC.KJDKBHKNHPD = num2;
|
|
GKNIHNHGBKC.KJDKBHKNHPD.GPGHKKMCFIF = true;
|
|
IL_17C:
|
|
GKNIHNHGBKC.KJDKBHKNHPD = mggkdbhmjdf3;
|
|
GKNIHNHGBKC.KJDKBHKNHPD.GPGHKKMCFIF = false;
|
|
}
|
|
IL_190:
|
|
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 flag7;
|
|
GKNIHNHGBKC.LGFOEBJPDKA.GPGHKKMCFIF = flag7;
|
|
SteamVR_Action_Boolean gripTurnButtonAction = this.GripTurnButtonAction;
|
|
GKNIHNHGBKC.MLHDMEMGHEO = gripTurnButtonAction;
|
|
bool flag8;
|
|
GKNIHNHGBKC.MLHDMEMGHEO.GPGHKKMCFIF = flag8;
|
|
SteamVR_Action_Boolean selfScaleButtonAction = this.SelfScaleButtonAction;
|
|
GKNIHNHGBKC.GODIAMIEPJG = selfScaleButtonAction;
|
|
bool flag9;
|
|
GKNIHNHGBKC.GODIAMIEPJG.GPGHKKMCFIF = flag9;
|
|
SteamVR_Action_Single pickupAxisAction = this.PickupAxisAction;
|
|
SteamVR_Action_Single handOpenCloseAxisAction = this.HandOpenCloseAxisAction;
|
|
float num3;
|
|
GKNIHNHGBKC.BDLBPMGCPEE = num3;
|
|
GKNIHNHGBKC.BDLBPMGCPEE.JIBLKPMDPOF = (float)num2;
|
|
Axis2DSettings smoothSwipeRotateAxisSettings = this.SmoothSwipeRotateAxisSettings;
|
|
GKNIHNHGBKC.EJAJMANMAFG = num3;
|
|
GKNIHNHGBKC.EJAJMANMAFG.y = y;
|
|
SteamVR_Action_Boolean sprintButtonAction = this.SprintButtonAction;
|
|
GKNIHNHGBKC.EHKHLEFKJND = sprintButtonAction;
|
|
bool flag10;
|
|
GKNIHNHGBKC.EHKHLEFKJND.GPGHKKMCFIF = flag10;
|
|
SteamVR_Action_Boolean slideButtonAction = this.SlideButtonAction;
|
|
GKNIHNHGBKC.KCEKNHAKHGA = slideButtonAction;
|
|
bool flag11;
|
|
GKNIHNHGBKC.KCEKNHAKHGA.GPGHKKMCFIF = flag11;
|
|
SteamVR_Action_Boolean selfScaleButtonAction2 = this.SelfScaleButtonAction;
|
|
GKNIHNHGBKC.HMPJMBEFGMM = selfScaleButtonAction2;
|
|
bool flag12;
|
|
GKNIHNHGBKC.HMPJMBEFGMM.GPGHKKMCFIF = flag12;
|
|
SteamVR_Action_Single triggerAxisAction = this.TriggerAxisAction;
|
|
float num4;
|
|
GKNIHNHGBKC.LOKMOOGCDHI = num4;
|
|
GKNIHNHGBKC.LOKMOOGCDHI.JIBLKPMDPOF = (float)num2;
|
|
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)num2;
|
|
Axis2DSettings rotateAxisSettings2 = this.RotateAxisSettings;
|
|
GKNIHNHGBKC.JBKKAKDEGHJ = num6;
|
|
GKNIHNHGBKC.JBKKAKDEGHJ.y = y;
|
|
SteamVR_Action_Boolean pushToTalkButtonAction2 = this.PushToTalkButtonAction;
|
|
GKNIHNHGBKC.BIOLPKIKBMN = pushToTalkButtonAction2;
|
|
bool flag13;
|
|
GKNIHNHGBKC.BIOLPKIKBMN.GPGHKKMCFIF = flag13;
|
|
if (Time.frameCount > 30)
|
|
{
|
|
int frameCount = Time.frameCount;
|
|
SteamVR_Action_Vibration haptics = this.haptics;
|
|
this.lastHapticFrame = frameCount;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600F31A RID: 62234 RVA: 0x0037E4BC File Offset: 0x0037C6BC
|
|
[Token(Token = "0x600F31A")]
|
|
[Address(RVA = "0xFBB970", Offset = "0xFBA770", VA = "0x180FBB970", 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: 0x0600F31B RID: 62235 RVA: 0x0037E510 File Offset: 0x0037C710
|
|
[Token(Token = "0x600F31B")]
|
|
[Address(RVA = "0xFBBA60", Offset = "0xFBA860", VA = "0x180FBBA60")]
|
|
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: 0x0400A1FF RID: 41471
|
|
[FieldOffset(Offset = "0x2A8")]
|
|
[Token(Token = "0x400A1FF")]
|
|
private SteamVR_Action_Boolean RotateTouchButtonAction;
|
|
|
|
// Token: 0x0400A200 RID: 41472
|
|
[FieldOffset(Offset = "0x2B0")]
|
|
[Token(Token = "0x400A200")]
|
|
private SteamVR_Action_Boolean RotatePressButtonAction;
|
|
|
|
// Token: 0x0400A201 RID: 41473
|
|
[FieldOffset(Offset = "0x2B8")]
|
|
[Token(Token = "0x400A201")]
|
|
[Header("Vive Swipe buttons")]
|
|
public AxisSwipeButtons RotateAxisSwipeButtons;
|
|
|
|
// Token: 0x0400A202 RID: 41474
|
|
[FieldOffset(Offset = "0x2C0")]
|
|
[Token(Token = "0x400A202")]
|
|
private bool touchDownInDeadZone;
|
|
|
|
// Token: 0x0400A203 RID: 41475
|
|
[FieldOffset(Offset = "0x2C4")]
|
|
[Token(Token = "0x400A203")]
|
|
private AxisSwipeButtons.MGGKDBHMJDF lastSwipeState;
|
|
|
|
// Token: 0x0400A204 RID: 41476
|
|
[FieldOffset(Offset = "0x2C8")]
|
|
[Token(Token = "0x400A204")]
|
|
private AxisSwipeButtons.MGGKDBHMJDF currentSwipeState;
|
|
|
|
// Token: 0x0400A205 RID: 41477
|
|
[FieldOffset(Offset = "0x2CC")]
|
|
[Token(Token = "0x400A205")]
|
|
private int lastHapticFrame;
|
|
|
|
// Token: 0x0400A206 RID: 41478
|
|
[Token(Token = "0x400A206")]
|
|
private const int HAPTIC_REFRESH_FRAMES = 30;
|
|
}
|
|
}
|