using System;
using Cpp2IlInjected;
using UnityEngine;

namespace RootMotion.Demos
{
	// Token: 0x020003E9 RID: 1001
	[Token(Token = "0x20003E9")]
	[RequireComponent(typeof(Animator))]
	public class SimpleLocomotion : MonoBehaviour
	{
		// Token: 0x1700020A RID: 522
		// (get) Token: 0x0600240B RID: 9227 RVA: 0x000521C8 File Offset: 0x000503C8
		// (set) Token: 0x0600240C RID: 9228 RVA: 0x000521DC File Offset: 0x000503DC
		[Token(Token = "0x1700020A")]
		public bool isGrounded
		{
			[Token(Token = "0x600240B")]
			[Address(RVA = "0x584D60", Offset = "0x583B60", VA = "0x180584D60")]
			get;
			[Token(Token = "0x600240C")]
			[Address(RVA = "0x8EC310", Offset = "0x8EB110", VA = "0x1808EC310")]
			private set;
		}

		// Token: 0x0600240D RID: 9229 RVA: 0x000521F0 File Offset: 0x000503F0
		[Token(Token = "0x600240D")]
		[Address(RVA = "0x11F3390", Offset = "0x11F2190", VA = "0x1811F3390")]
		private void Start()
		{
			Animator component = base.GetComponent<Animator>();
			this.animator = component;
			CharacterController component2 = base.GetComponent<CharacterController>();
			this.characterController = component2;
			CameraController cameraController = this.cameraController;
			int num = 0;
			cameraController.enabled = num != 0;
		}

		// Token: 0x0600240E RID: 9230 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600240E")]
		[Address(RVA = "0x11F3420", Offset = "0x11F2220", VA = "0x1811F3420")]
		private void Update()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600240F RID: 9231 RVA: 0x00052230 File Offset: 0x00050430
		[Token(Token = "0x600240F")]
		[Address(RVA = "0x11F2CC0", Offset = "0x11F1AC0", VA = "0x1811F2CC0")]
		private void LateUpdate()
		{
			this.cameraController.UpdateInput();
			this.cameraController.UpdateTransform();
		}

		// Token: 0x06002410 RID: 9232 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002410")]
		[Address(RVA = "0x11F2FE0", Offset = "0x11F1DE0", VA = "0x1811F2FE0")]
		private void Rotate()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002411 RID: 9233 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002411")]
		[Address(RVA = "0x11F2D00", Offset = "0x11F1B00", VA = "0x1811F2D00")]
		private void Move()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002412 RID: 9234 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002412")]
		[Address(RVA = "0x11F2C00", Offset = "0x11F1A00", VA = "0x1811F2C00")]
		private Vector3 GetInputVector()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002413 RID: 9235 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002413")]
		[Address(RVA = "0x11F2B80", Offset = "0x11F1980", VA = "0x1811F2B80")]
		private Vector3 GetInputVectorRaw()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002414 RID: 9236 RVA: 0x0005225C File Offset: 0x0005045C
		[Token(Token = "0x6002414")]
		[Address(RVA = "0x11F3480", Offset = "0x11F2280", VA = "0x1811F3480")]
		public SimpleLocomotion()
		{
		}

		// Token: 0x04002DD0 RID: 11728
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4002DD0")]
		[SerializeField]
		[Tooltip("The component that updates the camera.")]
		private CameraController cameraController;

		// Token: 0x04002DD1 RID: 11729
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4002DD1")]
		[SerializeField]
		[Tooltip("Acceleration of movement.")]
		private float accelerationTime = 0.2f;

		// Token: 0x04002DD2 RID: 11730
		[FieldOffset(Offset = "0x24")]
		[Token(Token = "0x4002DD2")]
		[SerializeField]
		[Tooltip("Turning speed.")]
		private float turnTime = 0.2f;

		// Token: 0x04002DD3 RID: 11731
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4002DD3")]
		[SerializeField]
		[Tooltip("If true, will run on left shift, if not will walk on left shift.")]
		private bool walkByDefault = true;

		// Token: 0x04002DD4 RID: 11732
		[FieldOffset(Offset = "0x2C")]
		[Token(Token = "0x4002DD4")]
		[SerializeField]
		[Tooltip("Smooth or linear rotation.")]
		private SimpleLocomotion.RotationMode rotationMode;

		// Token: 0x04002DD5 RID: 11733
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4002DD5")]
		[SerializeField]
		[Tooltip("Procedural motion speed (if not using root motion).")]
		private float moveSpeed = 3f;

		// Token: 0x04002DD7 RID: 11735
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4002DD7")]
		private Animator animator;

		// Token: 0x04002DD8 RID: 11736
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4002DD8")]
		private float speed;

		// Token: 0x04002DD9 RID: 11737
		[FieldOffset(Offset = "0x44")]
		[Token(Token = "0x4002DD9")]
		private float angleVel;

		// Token: 0x04002DDA RID: 11738
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x4002DDA")]
		private float speedVel;

		// Token: 0x04002DDB RID: 11739
		[FieldOffset(Offset = "0x4C")]
		[Token(Token = "0x4002DDB")]
		private Vector3 linearTargetDirection;

		// Token: 0x04002DDC RID: 11740
		[FieldOffset(Offset = "0x58")]
		[Token(Token = "0x4002DDC")]
		private CharacterController characterController;

		// Token: 0x020003EA RID: 1002
		[Token(Token = "0x20003EA")]
		[Serializable]
		public enum RotationMode
		{
			// Token: 0x04002DDE RID: 11742
			[Token(Token = "0x4002DDE")]
			Smooth,
			// Token: 0x04002DDF RID: 11743
			[Token(Token = "0x4002DDF")]
			Linear
		}
	}
}
