using System;
using System.Collections;
using Cpp2IlInjected;
using UnityEngine;

namespace RootMotion.Demos
{
	// Token: 0x020003DC RID: 988
	[Token(Token = "0x20003DC")]
	public class PlatformRotator : MonoBehaviour
	{
		// Token: 0x060023C9 RID: 9161 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60023C9")]
		[Address(RVA = "0x312F30", Offset = "0x311D30", VA = "0x180312F30")]
		private void Start()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060023CA RID: 9162 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60023CA")]
		[Address(RVA = "0x312AF0", Offset = "0x3118F0", VA = "0x180312AF0")]
		private void FixedUpdate()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060023CB RID: 9163 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60023CB")]
		[Address(RVA = "0x3130A0", Offset = "0x311EA0", VA = "0x1803130A0")]
		private IEnumerator SwitchRotation()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060023CC RID: 9164 RVA: 0x00051CC8 File Offset: 0x0004FEC8
		[Token(Token = "0x60023CC")]
		[Address(RVA = "0x312D80", Offset = "0x311B80", VA = "0x180312D80")]
		private void OnCollisionEnter(Collision collision)
		{
			if (collision.gameObject.layer == this.characterLayer)
			{
				CharacterThirdPerson component = collision.gameObject.GetComponent<CharacterThirdPerson>();
				int num = 0;
				bool flag = component == num;
				if (!flag && component.smoothPhysics != flag)
				{
					component.smoothPhysics = flag;
				}
			}
		}

		// Token: 0x060023CD RID: 9165 RVA: 0x00051D18 File Offset: 0x0004FF18
		[Token(Token = "0x60023CD")]
		[Address(RVA = "0x312E60", Offset = "0x311C60", VA = "0x180312E60")]
		private void OnCollisionExit(Collision collision)
		{
			if (collision.gameObject.layer == this.characterLayer)
			{
				CharacterThirdPerson component = collision.gameObject.GetComponent<CharacterThirdPerson>();
				int num = 0;
				if (!(component == num))
				{
					component.smoothPhysics = true;
				}
			}
		}

		// Token: 0x060023CE RID: 9166 RVA: 0x00051D60 File Offset: 0x0004FF60
		[Token(Token = "0x60023CE")]
		[Address(RVA = "0x313110", Offset = "0x311F10", VA = "0x180313110")]
		public PlatformRotator()
		{
		}

		// Token: 0x04002D5B RID: 11611
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4002D5B")]
		public float maxAngle = 70f;

		// Token: 0x04002D5C RID: 11612
		[FieldOffset(Offset = "0x1C")]
		[Token(Token = "0x4002D5C")]
		public float switchRotationTime = 0.5f;

		// Token: 0x04002D5D RID: 11613
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4002D5D")]
		public float random = 0.5f;

		// Token: 0x04002D5E RID: 11614
		[FieldOffset(Offset = "0x24")]
		[Token(Token = "0x4002D5E")]
		public float rotationSpeed = 50f;

		// Token: 0x04002D5F RID: 11615
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4002D5F")]
		public Vector3 movePosition;

		// Token: 0x04002D60 RID: 11616
		[FieldOffset(Offset = "0x34")]
		[Token(Token = "0x4002D60")]
		public float moveSpeed = 5f;

		// Token: 0x04002D61 RID: 11617
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4002D61")]
		public int characterLayer;

		// Token: 0x04002D62 RID: 11618
		[FieldOffset(Offset = "0x3C")]
		[Token(Token = "0x4002D62")]
		private Quaternion defaultRotation;

		// Token: 0x04002D63 RID: 11619
		[FieldOffset(Offset = "0x4C")]
		[Token(Token = "0x4002D63")]
		private Quaternion targetRotation;

		// Token: 0x04002D64 RID: 11620
		[FieldOffset(Offset = "0x5C")]
		[Token(Token = "0x4002D64")]
		private Vector3 targetPosition;

		// Token: 0x04002D65 RID: 11621
		[FieldOffset(Offset = "0x68")]
		[Token(Token = "0x4002D65")]
		private Vector3 velocity;

		// Token: 0x04002D66 RID: 11622
		[FieldOffset(Offset = "0x78")]
		[Token(Token = "0x4002D66")]
		private Rigidbody r;
	}
}
