using System;
using System.Collections;
using Cpp2IlInjected;
using UnityEngine;
using UnitySA.Utility;

namespace UnitySA.Characters.FirstPerson
{
	// Token: 0x020005D6 RID: 1494
	[Token(Token = "0x20005D6")]
	[RequireComponent(typeof(CharacterController))]
	[RequireComponent(typeof(AudioSource))]
	public class FPCtrl : MonoBehaviour
	{
		// Token: 0x06002F6F RID: 12143 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002F6F")]
		[Address(RVA = "0x4BCFD0", Offset = "0x4BBDD0", VA = "0x1804BCFD0")]
		private void Start()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002F70 RID: 12144 RVA: 0x000652A4 File Offset: 0x000634A4
		[Token(Token = "0x6002F70")]
		[Address(RVA = "0x4BD490", Offset = "0x4BC290", VA = "0x1804BD490")]
		private void Update()
		{
			MLook mouseLook = this.m_MouseLook;
			Transform transform = base.transform;
			Transform transform2 = this.m_Camera.transform;
			mouseLook.LookRotation(transform, transform2);
			if (!this.m_Jump)
			{
				bool buttonDown = Input.GetButtonDown("Jump");
				this.m_Jump = buttonDown;
			}
			int num = 0;
			if ((this.m_PreviouslyGrounded ? 1 : 0) == num && this.m_CharacterController.isGrounded)
			{
				IEnumerator enumerator = this.m_JumpBob.DoBobCycle();
				Coroutine coroutine = base.StartCoroutine(enumerator);
				this.m_MoveDir.y = (float)num;
				this.m_Jumping = num != 0;
			}
			if (!this.m_CharacterController.isGrounded && (this.m_Jumping ? 1 : 0) == num && (this.m_PreviouslyGrounded ? 1 : 0) != num)
			{
				this.m_MoveDir.y = (float)num;
			}
			bool isGrounded = this.m_CharacterController.isGrounded;
			this.m_PreviouslyGrounded = isGrounded;
		}

		// Token: 0x06002F71 RID: 12145 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002F71")]
		[Address(RVA = "0x4BC4B0", Offset = "0x4BB2B0", VA = "0x1804BC4B0")]
		private void FixedUpdate()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002F72 RID: 12146 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002F72")]
		[Address(RVA = "0x4BCE20", Offset = "0x4BBC20", VA = "0x1804BCE20")]
		private void ProgressStepCycle(float speed)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002F73 RID: 12147 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002F73")]
		[Address(RVA = "0x4BD220", Offset = "0x4BC020", VA = "0x1804BD220")]
		private void UpdateCameraPosition(float speed)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002F74 RID: 12148 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002F74")]
		[Address(RVA = "0x4BCA70", Offset = "0x4BB870", VA = "0x1804BCA70")]
		private void GetInput(out float speed)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002F75 RID: 12149 RVA: 0x00065380 File Offset: 0x00063580
		[Token(Token = "0x6002F75")]
		[Address(RVA = "0x4BCF70", Offset = "0x4BBD70", VA = "0x1804BCF70")]
		private void RotateView()
		{
			MLook mouseLook = this.m_MouseLook;
			Transform transform = base.transform;
			Transform transform2 = this.m_Camera.transform;
			mouseLook.LookRotation(transform, transform2);
		}

		// Token: 0x06002F76 RID: 12150 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002F76")]
		[Address(RVA = "0x4BCC70", Offset = "0x4BBA70", VA = "0x1804BCC70")]
		private void OnControllerColliderHit(ControllerColliderHit hit)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002F77 RID: 12151 RVA: 0x000653B8 File Offset: 0x000635B8
		[Token(Token = "0x6002F77")]
		[Address(RVA = "0x4BD5D0", Offset = "0x4BC3D0", VA = "0x1804BD5D0")]
		public FPCtrl()
		{
			CurveCtrlBob curveCtrlBob = new CurveCtrlBob();
			this.m_HeadBob = curveCtrlBob;
			LerpCtrlBob lerpCtrlBob = new LerpCtrlBob();
			this.m_JumpBob = lerpCtrlBob;
			float z = Vector3.zero.z;
			this.m_MoveDir.z = z;
			base..ctor();
		}

		// Token: 0x0400399F RID: 14751
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x400399F")]
		[SerializeField]
		private bool m_IsWalking;

		// Token: 0x040039A0 RID: 14752
		[FieldOffset(Offset = "0x1C")]
		[Token(Token = "0x40039A0")]
		[SerializeField]
		private float m_WalkSpeed;

		// Token: 0x040039A1 RID: 14753
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x40039A1")]
		[SerializeField]
		private float m_RunSpeed;

		// Token: 0x040039A2 RID: 14754
		[FieldOffset(Offset = "0x24")]
		[Token(Token = "0x40039A2")]
		[SerializeField]
		[Range(0f, 1f)]
		private float m_RunstepLenghten;

		// Token: 0x040039A3 RID: 14755
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x40039A3")]
		[SerializeField]
		private float m_JumpSpeed;

		// Token: 0x040039A4 RID: 14756
		[FieldOffset(Offset = "0x2C")]
		[Token(Token = "0x40039A4")]
		[SerializeField]
		private float m_StickToGroundForce;

		// Token: 0x040039A5 RID: 14757
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x40039A5")]
		[SerializeField]
		private float m_GravityMultiplier;

		// Token: 0x040039A6 RID: 14758
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x40039A6")]
		[SerializeField]
		private MLook m_MouseLook;

		// Token: 0x040039A7 RID: 14759
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x40039A7")]
		[SerializeField]
		private bool m_UseFovKick;

		// Token: 0x040039A8 RID: 14760
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x40039A8")]
		[SerializeField]
		private FOVZoom m_FovKick = new FOVZoom
		{
			FOVIncrease = 3f,
			TimeToIncrease = 1f,
			TimeToDecrease = 1f
		};

		// Token: 0x040039A9 RID: 14761
		[FieldOffset(Offset = "0x50")]
		[Token(Token = "0x40039A9")]
		[SerializeField]
		private bool m_UseHeadBob;

		// Token: 0x040039AA RID: 14762
		[FieldOffset(Offset = "0x58")]
		[Token(Token = "0x40039AA")]
		[SerializeField]
		private CurveCtrlBob m_HeadBob;

		// Token: 0x040039AB RID: 14763
		[FieldOffset(Offset = "0x60")]
		[Token(Token = "0x40039AB")]
		[SerializeField]
		private LerpCtrlBob m_JumpBob;

		// Token: 0x040039AC RID: 14764
		[FieldOffset(Offset = "0x68")]
		[Token(Token = "0x40039AC")]
		[SerializeField]
		private float m_StepInterval;

		// Token: 0x040039AD RID: 14765
		[FieldOffset(Offset = "0x70")]
		[Token(Token = "0x40039AD")]
		private Camera m_Camera;

		// Token: 0x040039AE RID: 14766
		[FieldOffset(Offset = "0x78")]
		[Token(Token = "0x40039AE")]
		private bool m_Jump;

		// Token: 0x040039AF RID: 14767
		[FieldOffset(Offset = "0x7C")]
		[Token(Token = "0x40039AF")]
		private float m_YRotation;

		// Token: 0x040039B0 RID: 14768
		[FieldOffset(Offset = "0x80")]
		[Token(Token = "0x40039B0")]
		private Vector2 m_Input;

		// Token: 0x040039B1 RID: 14769
		[FieldOffset(Offset = "0x88")]
		[Token(Token = "0x40039B1")]
		private Vector3 m_MoveDir;

		// Token: 0x040039B2 RID: 14770
		[FieldOffset(Offset = "0x98")]
		[Token(Token = "0x40039B2")]
		private CharacterController m_CharacterController;

		// Token: 0x040039B3 RID: 14771
		[FieldOffset(Offset = "0xA0")]
		[Token(Token = "0x40039B3")]
		private CollisionFlags m_CollisionFlags;

		// Token: 0x040039B4 RID: 14772
		[FieldOffset(Offset = "0xA4")]
		[Token(Token = "0x40039B4")]
		private bool m_PreviouslyGrounded;

		// Token: 0x040039B5 RID: 14773
		[FieldOffset(Offset = "0xA8")]
		[Token(Token = "0x40039B5")]
		private Vector3 m_OriginalCameraPosition;

		// Token: 0x040039B6 RID: 14774
		[FieldOffset(Offset = "0xB4")]
		[Token(Token = "0x40039B6")]
		private float m_StepCycle;

		// Token: 0x040039B7 RID: 14775
		[FieldOffset(Offset = "0xB8")]
		[Token(Token = "0x40039B7")]
		private float m_NextStep;

		// Token: 0x040039B8 RID: 14776
		[FieldOffset(Offset = "0xBC")]
		[Token(Token = "0x40039B8")]
		private bool m_Jumping;
	}
}
