100 lines
3.2 KiB
C#
100 lines
3.2 KiB
C#
using System;
|
|
using Cpp2IlInjected;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
|
|
namespace Obi.CrossPlatformInput
|
|
{
|
|
// Token: 0x0200054A RID: 1354
|
|
[Token(Token = "0x200054A")]
|
|
public class AxisTouchButton : MonoBehaviour, IPointerDownHandler, IEventSystemHandler, IPointerUpHandler
|
|
{
|
|
// Token: 0x06002F14 RID: 12052 RVA: 0x000671B4 File Offset: 0x000653B4
|
|
[Token(Token = "0x6002F14")]
|
|
[Address(RVA = "0x79E0E0", Offset = "0x79D0E0", VA = "0x18079E0E0")]
|
|
private void OnEnable()
|
|
{
|
|
bool flag = CrossPlatformInputManager.AxisExists(this.axisName);
|
|
string text = this.axisName;
|
|
if (flag)
|
|
{
|
|
CrossPlatformInputManager.VirtualAxis virtualAxis = CrossPlatformInputManager.VirtualAxisReference(text);
|
|
this.m_Axis = virtualAxis;
|
|
}
|
|
CrossPlatformInputManager.VirtualAxis virtualAxis2 = new CrossPlatformInputManager.VirtualAxis(text);
|
|
this.m_Axis = virtualAxis2;
|
|
CrossPlatformInputManager.RegisterVirtualAxis(this.m_Axis);
|
|
this.FindPairedButton();
|
|
}
|
|
|
|
// Token: 0x06002F15 RID: 12053 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002F15")]
|
|
[Address(RVA = "0x79DF00", Offset = "0x79CF00", VA = "0x18079DF00")]
|
|
private void FindPairedButton()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002F16 RID: 12054 RVA: 0x00067208 File Offset: 0x00065408
|
|
[Token(Token = "0x6002F16")]
|
|
[Address(RVA = "0x79E0C0", Offset = "0x79D0C0", VA = "0x18079E0C0")]
|
|
private void OnDisable()
|
|
{
|
|
this.m_Axis.Remove();
|
|
}
|
|
|
|
// Token: 0x06002F17 RID: 12055 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002F17")]
|
|
[Address(RVA = "0x79E200", Offset = "0x79D200", VA = "0x18079E200", Slot = "4")]
|
|
public void OnPointerDown(PointerEventData data)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002F18 RID: 12056 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002F18")]
|
|
[Address(RVA = "0x79E2E0", Offset = "0x79D2E0", VA = "0x18079E2E0", Slot = "5")]
|
|
public void OnPointerUp(PointerEventData data)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002F19 RID: 12057 RVA: 0x00067228 File Offset: 0x00065428
|
|
[Token(Token = "0x6002F19")]
|
|
[Address(RVA = "0x79E340", Offset = "0x79D340", VA = "0x18079E340")]
|
|
public AxisTouchButton()
|
|
{
|
|
}
|
|
|
|
// Token: 0x0400379D RID: 14237
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x400379D")]
|
|
public string axisName = "Horizontal";
|
|
|
|
// Token: 0x0400379E RID: 14238
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x400379E")]
|
|
public float axisValue = 1f;
|
|
|
|
// Token: 0x0400379F RID: 14239
|
|
[FieldOffset(Offset = "0x24")]
|
|
[Token(Token = "0x400379F")]
|
|
public float responseSpeed = 3f;
|
|
|
|
// Token: 0x040037A0 RID: 14240
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x40037A0")]
|
|
public float returnToCentreSpeed = 3f;
|
|
|
|
// Token: 0x040037A1 RID: 14241
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x40037A1")]
|
|
private AxisTouchButton m_PairedWith;
|
|
|
|
// Token: 0x040037A2 RID: 14242
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x40037A2")]
|
|
private CrossPlatformInputManager.VirtualAxis m_Axis;
|
|
}
|
|
}
|