using System;
using Cpp2IlInjected;
using UnityEngine;

namespace RootMotion.Demos
{
	// Token: 0x02000441 RID: 1089
	[Token(Token = "0x2000441")]
	[RequireComponent(typeof(Animator))]
	public class SimpleLocomotion : MonoBehaviour
	{
		// Token: 0x1700022F RID: 559
		// (get) Token: 0x060026D4 RID: 9940 RVA: 0x00059428 File Offset: 0x00057628
		// (set) Token: 0x060026D5 RID: 9941 RVA: 0x0005943C File Offset: 0x0005763C
		[Token(Token = "0x1700022F")]
		public bool isGrounded
		{
			[Token(Token = "0x60026D4")]
			[Address(RVA = "0x596FC0", Offset = "0x595FC0", VA = "0x180596FC0")]
			get;
			[Token(Token = "0x60026D5")]
			[Address(RVA = "0x96E8B0", Offset = "0x96D8B0", VA = "0x18096E8B0")]
			private set;
		}

		// Token: 0x060026D6 RID: 9942 RVA: 0x00059450 File Offset: 0x00057650
		[Token(Token = "0x60026D6")]
		[Address(RVA = "0x1461340", Offset = "0x1460340", VA = "0x181461340")]
		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: 0x060026D7 RID: 9943 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60026D7")]
		[Address(RVA = "0x14613D0", Offset = "0x14603D0", VA = "0x1814613D0")]
		private void Update()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060026D8 RID: 9944 RVA: 0x00059490 File Offset: 0x00057690
		[Token(Token = "0x60026D8")]
		[Address(RVA = "0x1460C70", Offset = "0x145FC70", VA = "0x181460C70")]
		private void LateUpdate()
		{
			this.cameraController.UpdateInput();
			this.cameraController.UpdateTransform();
		}

		// Token: 0x060026D9 RID: 9945 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60026D9")]
		[Address(RVA = "0x1460F90", Offset = "0x145FF90", VA = "0x181460F90")]
		private void Rotate()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060026DA RID: 9946 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60026DA")]
		[Address(RVA = "0x1460CB0", Offset = "0x145FCB0", VA = "0x181460CB0")]
		private void Move()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060026DB RID: 9947 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60026DB")]
		[Address(RVA = "0x1460BB0", Offset = "0x145FBB0", VA = "0x181460BB0")]
		private Vector3 GetInputVector()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060026DC RID: 9948 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60026DC")]
		[Address(RVA = "0x1460B30", Offset = "0x145FB30", VA = "0x181460B30")]
		private Vector3 GetInputVectorRaw()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060026DD RID: 9949 RVA: 0x000594BC File Offset: 0x000576BC
		[Token(Token = "0x60026DD")]
		[Address(RVA = "0x1461430", Offset = "0x1460430", VA = "0x181461430")]
		public SimpleLocomotion()
		{
		}

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

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

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

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

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

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

		// Token: 0x040030C1 RID: 12481
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x40030C1")]
		private Animator animator;

		// Token: 0x040030C2 RID: 12482
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x40030C2")]
		private float speed;

		// Token: 0x040030C3 RID: 12483
		[FieldOffset(Offset = "0x44")]
		[Token(Token = "0x40030C3")]
		private float angleVel;

		// Token: 0x040030C4 RID: 12484
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x40030C4")]
		private float speedVel;

		// Token: 0x040030C5 RID: 12485
		[FieldOffset(Offset = "0x4C")]
		[Token(Token = "0x40030C5")]
		private Vector3 linearTargetDirection;

		// Token: 0x040030C6 RID: 12486
		[FieldOffset(Offset = "0x58")]
		[Token(Token = "0x40030C6")]
		private CharacterController characterController;

		// Token: 0x02000442 RID: 1090
		[Token(Token = "0x2000442")]
		[Serializable]
		public enum RotationMode
		{
			// Token: 0x040030C8 RID: 12488
			[Token(Token = "0x40030C8")]
			Smooth,
			// Token: 0x040030C9 RID: 12489
			[Token(Token = "0x40030C9")]
			Linear
		}
	}
}
