using System;
using Cpp2IlInjected;
using UnityEngine;
using UnityEngine.EventSystems;

namespace Obi.CrossPlatformInput
{
	// Token: 0x020004F2 RID: 1266
	[Token(Token = "0x20004F2")]
	public class AxisTouchButton : MonoBehaviour, IPointerDownHandler, IEventSystemHandler, IPointerUpHandler
	{
		// Token: 0x06002C4B RID: 11339 RVA: 0x0005FF20 File Offset: 0x0005E120
		[Token(Token = "0x6002C4B")]
		[Address(RVA = "0x8D2A20", Offset = "0x8D1820", VA = "0x1808D2A20")]
		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: 0x06002C4C RID: 11340 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C4C")]
		[Address(RVA = "0x8D2840", Offset = "0x8D1640", VA = "0x1808D2840")]
		private void FindPairedButton()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C4D RID: 11341 RVA: 0x0005FF74 File Offset: 0x0005E174
		[Token(Token = "0x6002C4D")]
		[Address(RVA = "0x8D2A00", Offset = "0x8D1800", VA = "0x1808D2A00")]
		private void OnDisable()
		{
			this.m_Axis.Remove();
		}

		// Token: 0x06002C4E RID: 11342 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C4E")]
		[Address(RVA = "0x8D2B40", Offset = "0x8D1940", VA = "0x1808D2B40", Slot = "4")]
		public void OnPointerDown(PointerEventData data)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C4F RID: 11343 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C4F")]
		[Address(RVA = "0x8D2C20", Offset = "0x8D1A20", VA = "0x1808D2C20", Slot = "5")]
		public void OnPointerUp(PointerEventData data)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C50 RID: 11344 RVA: 0x0005FF94 File Offset: 0x0005E194
		[Token(Token = "0x6002C50")]
		[Address(RVA = "0x8D2C80", Offset = "0x8D1A80", VA = "0x1808D2C80")]
		public AxisTouchButton()
		{
		}

		// Token: 0x040034B3 RID: 13491
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x40034B3")]
		public string axisName = "Horizontal";

		// Token: 0x040034B4 RID: 13492
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x40034B4")]
		public float axisValue = 1f;

		// Token: 0x040034B5 RID: 13493
		[FieldOffset(Offset = "0x24")]
		[Token(Token = "0x40034B5")]
		public float responseSpeed = 3f;

		// Token: 0x040034B6 RID: 13494
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x40034B6")]
		public float returnToCentreSpeed = 3f;

		// Token: 0x040034B7 RID: 13495
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x40034B7")]
		private AxisTouchButton m_PairedWith;

		// Token: 0x040034B8 RID: 13496
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x40034B8")]
		private CrossPlatformInputManager.VirtualAxis m_Axis;
	}
}
