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

namespace Obi.Characters.ThirdPerson
{
	// Token: 0x02000549 RID: 1353
	[Token(Token = "0x2000549")]
	[RequireComponent(typeof(ThirdPersonCharacter))]
	public class ThirdPersonUserControl : MonoBehaviour
	{
		// Token: 0x06002F10 RID: 12048 RVA: 0x00067120 File Offset: 0x00065320
		[Token(Token = "0x6002F10")]
		[Address(RVA = "0xF5DE40", Offset = "0xF5CE40", VA = "0x180F5DE40")]
		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: 0x06002F11 RID: 12049 RVA: 0x00067178 File Offset: 0x00065378
		[Token(Token = "0x6002F11")]
		[Address(RVA = "0xF5DF50", Offset = "0xF5CF50", VA = "0x180F5DF50")]
		private void Update()
		{
			if (!this.m_Jump)
			{
				bool buttonDown = CrossPlatformInputManager.GetButtonDown("Jump");
				this.m_Jump = buttonDown;
			}
		}

		// Token: 0x06002F12 RID: 12050 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002F12")]
		[Address(RVA = "0xF5DAA0", Offset = "0xF5CAA0", VA = "0x180F5DAA0")]
		private void FixedUpdate()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002F13 RID: 12051 RVA: 0x000671A0 File Offset: 0x000653A0
		[Token(Token = "0x6002F13")]
		[Address(RVA = "0x328C40", Offset = "0x327C40", VA = "0x180328C40")]
		public ThirdPersonUserControl()
		{
		}

		// Token: 0x04003798 RID: 14232
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4003798")]
		private ThirdPersonCharacter m_Character;

		// Token: 0x04003799 RID: 14233
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4003799")]
		private Transform m_Cam;

		// Token: 0x0400379A RID: 14234
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x400379A")]
		private Vector3 m_CamForward;

		// Token: 0x0400379B RID: 14235
		[FieldOffset(Offset = "0x34")]
		[Token(Token = "0x400379B")]
		private Vector3 m_Move;

		// Token: 0x0400379C RID: 14236
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x400379C")]
		private bool m_Jump;
	}
}
