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

namespace UnitySA.Characters.FirstPerson
{
	// Token: 0x0200062E RID: 1582
	[Token(Token = "0x200062E")]
	[RequireComponent(typeof(CharacterController))]
	[RequireComponent(typeof(AudioSource))]
	public class FPCtrl : MonoBehaviour
	{
		// Token: 0x06003238 RID: 12856 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003238")]
		[Address(RVA = "0xD18D10", Offset = "0xD17D10", VA = "0x180D18D10")]
		private void Start()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06003239 RID: 12857 RVA: 0x0006C574 File Offset: 0x0006A774
		[Token(Token = "0x6003239")]
		[Address(RVA = "0xD191D0", Offset = "0xD181D0", VA = "0x180D191D0")]
		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: 0x0600323A RID: 12858 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600323A")]
		[Address(RVA = "0xD181F0", Offset = "0xD171F0", VA = "0x180D181F0")]
		private void FixedUpdate()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600323B RID: 12859 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600323B")]
		[Address(RVA = "0xD18B60", Offset = "0xD17B60", VA = "0x180D18B60")]
		private void ProgressStepCycle(float speed)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600323C RID: 12860 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600323C")]
		[Address(RVA = "0xD18F60", Offset = "0xD17F60", VA = "0x180D18F60")]
		private void UpdateCameraPosition(float speed)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600323D RID: 12861 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600323D")]
		[Address(RVA = "0xD187B0", Offset = "0xD177B0", VA = "0x180D187B0")]
		private void GetInput(out float speed)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600323E RID: 12862 RVA: 0x0006C650 File Offset: 0x0006A850
		[Token(Token = "0x600323E")]
		[Address(RVA = "0xD18CB0", Offset = "0xD17CB0", VA = "0x180D18CB0")]
		private void RotateView()
		{
			MLook mouseLook = this.m_MouseLook;
			Transform transform = base.transform;
			Transform transform2 = this.m_Camera.transform;
			mouseLook.LookRotation(transform, transform2);
		}

		// Token: 0x0600323F RID: 12863 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600323F")]
		[Address(RVA = "0xD189B0", Offset = "0xD179B0", VA = "0x180D189B0")]
		private void OnControllerColliderHit(ControllerColliderHit hit)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06003240 RID: 12864 RVA: 0x0006C688 File Offset: 0x0006A888
		[Token(Token = "0x6003240")]
		[Address(RVA = "0xD19310", Offset = "0xD18310", VA = "0x180D19310")]
		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: 0x04003C89 RID: 15497
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4003C89")]
		[SerializeField]
		private bool m_IsWalking;

		// Token: 0x04003C8A RID: 15498
		[FieldOffset(Offset = "0x1C")]
		[Token(Token = "0x4003C8A")]
		[SerializeField]
		private float m_WalkSpeed;

		// Token: 0x04003C8B RID: 15499
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4003C8B")]
		[SerializeField]
		private float m_RunSpeed;

		// Token: 0x04003C8C RID: 15500
		[FieldOffset(Offset = "0x24")]
		[Token(Token = "0x4003C8C")]
		[SerializeField]
		[Range(0f, 1f)]
		private float m_RunstepLenghten;

		// Token: 0x04003C8D RID: 15501
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003C8D")]
		[SerializeField]
		private float m_JumpSpeed;

		// Token: 0x04003C8E RID: 15502
		[FieldOffset(Offset = "0x2C")]
		[Token(Token = "0x4003C8E")]
		[SerializeField]
		private float m_StickToGroundForce;

		// Token: 0x04003C8F RID: 15503
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003C8F")]
		[SerializeField]
		private float m_GravityMultiplier;

		// Token: 0x04003C90 RID: 15504
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4003C90")]
		[SerializeField]
		private MLook m_MouseLook;

		// Token: 0x04003C91 RID: 15505
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4003C91")]
		[SerializeField]
		private bool m_UseFovKick;

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

		// Token: 0x04003C93 RID: 15507
		[FieldOffset(Offset = "0x50")]
		[Token(Token = "0x4003C93")]
		[SerializeField]
		private bool m_UseHeadBob;

		// Token: 0x04003C94 RID: 15508
		[FieldOffset(Offset = "0x58")]
		[Token(Token = "0x4003C94")]
		[SerializeField]
		private CurveCtrlBob m_HeadBob;

		// Token: 0x04003C95 RID: 15509
		[FieldOffset(Offset = "0x60")]
		[Token(Token = "0x4003C95")]
		[SerializeField]
		private LerpCtrlBob m_JumpBob;

		// Token: 0x04003C96 RID: 15510
		[FieldOffset(Offset = "0x68")]
		[Token(Token = "0x4003C96")]
		[SerializeField]
		private float m_StepInterval;

		// Token: 0x04003C97 RID: 15511
		[FieldOffset(Offset = "0x70")]
		[Token(Token = "0x4003C97")]
		private Camera m_Camera;

		// Token: 0x04003C98 RID: 15512
		[FieldOffset(Offset = "0x78")]
		[Token(Token = "0x4003C98")]
		private bool m_Jump;

		// Token: 0x04003C99 RID: 15513
		[FieldOffset(Offset = "0x7C")]
		[Token(Token = "0x4003C99")]
		private float m_YRotation;

		// Token: 0x04003C9A RID: 15514
		[FieldOffset(Offset = "0x80")]
		[Token(Token = "0x4003C9A")]
		private Vector2 m_Input;

		// Token: 0x04003C9B RID: 15515
		[FieldOffset(Offset = "0x88")]
		[Token(Token = "0x4003C9B")]
		private Vector3 m_MoveDir;

		// Token: 0x04003C9C RID: 15516
		[FieldOffset(Offset = "0x98")]
		[Token(Token = "0x4003C9C")]
		private CharacterController m_CharacterController;

		// Token: 0x04003C9D RID: 15517
		[FieldOffset(Offset = "0xA0")]
		[Token(Token = "0x4003C9D")]
		private CollisionFlags m_CollisionFlags;

		// Token: 0x04003C9E RID: 15518
		[FieldOffset(Offset = "0xA4")]
		[Token(Token = "0x4003C9E")]
		private bool m_PreviouslyGrounded;

		// Token: 0x04003C9F RID: 15519
		[FieldOffset(Offset = "0xA8")]
		[Token(Token = "0x4003C9F")]
		private Vector3 m_OriginalCameraPosition;

		// Token: 0x04003CA0 RID: 15520
		[FieldOffset(Offset = "0xB4")]
		[Token(Token = "0x4003CA0")]
		private float m_StepCycle;

		// Token: 0x04003CA1 RID: 15521
		[FieldOffset(Offset = "0xB8")]
		[Token(Token = "0x4003CA1")]
		private float m_NextStep;

		// Token: 0x04003CA2 RID: 15522
		[FieldOffset(Offset = "0xBC")]
		[Token(Token = "0x4003CA2")]
		private bool m_Jumping;
	}
}
