using System;
using Cpp2IlInjected;
using Obi.CrossPlatformInput;
using UnityEngine;

namespace Obi.Characters.ThirdPerson
{
	// Token: 0x020004F1 RID: 1265
	[Token(Token = "0x20004F1")]
	[RequireComponent(typeof(ThirdPersonCharacter))]
	public class ThirdPersonUserControl : MonoBehaviour
	{
		// Token: 0x06002C47 RID: 11335 RVA: 0x0005FE8C File Offset: 0x0005E08C
		[Token(Token = "0x6002C47")]
		[Address(RVA = "0x13007D0", Offset = "0x12FF5D0", VA = "0x1813007D0")]
		private void Start()
		{
			Camera main = Camera.main;
			int num = 0;
			if (!(main != num))
			{
				Debug.LogWarning("Warning: no main camera found. Third person character needs a Camera tagged \"MainCamera\", for camera-relative controls.");
			}
			Transform transform = Camera.main.transform;
			this.m_Cam = transform;
			ThirdPersonCharacter component = base.GetComponent<ThirdPersonCharacter>();
			this.m_Character = component;
			throw new NullReferenceException();
		}

		// Token: 0x06002C48 RID: 11336 RVA: 0x0005FEE4 File Offset: 0x0005E0E4
		[Token(Token = "0x6002C48")]
		[Address(RVA = "0x13008E0", Offset = "0x12FF6E0", VA = "0x1813008E0")]
		private void Update()
		{
			if (!this.m_Jump)
			{
				bool buttonDown = CrossPlatformInputManager.GetButtonDown("Jump");
				this.m_Jump = buttonDown;
			}
		}

		// Token: 0x06002C49 RID: 11337 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C49")]
		[Address(RVA = "0x1300430", Offset = "0x12FF230", VA = "0x181300430")]
		private void FixedUpdate()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C4A RID: 11338 RVA: 0x0005FF0C File Offset: 0x0005E10C
		[Token(Token = "0x6002C4A")]
		[Address(RVA = "0x3088F0", Offset = "0x3076F0", VA = "0x1803088F0")]
		public ThirdPersonUserControl()
		{
		}

		// Token: 0x040034AE RID: 13486
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x40034AE")]
		private ThirdPersonCharacter m_Character;

		// Token: 0x040034AF RID: 13487
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x40034AF")]
		private Transform m_Cam;

		// Token: 0x040034B0 RID: 13488
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x40034B0")]
		private Vector3 m_CamForward;

		// Token: 0x040034B1 RID: 13489
		[FieldOffset(Offset = "0x34")]
		[Token(Token = "0x40034B1")]
		private Vector3 m_Move;

		// Token: 0x040034B2 RID: 13490
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x40034B2")]
		private bool m_Jump;
	}
}
