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

namespace RootMotion.Demos
{
	// Token: 0x02000434 RID: 1076
	[Token(Token = "0x2000434")]
	public class PlatformRotator : MonoBehaviour
	{
		// Token: 0x06002692 RID: 9874 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002692")]
		[Address(RVA = "0x3338B0", Offset = "0x3328B0", VA = "0x1803338B0")]
		private void Start()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002693 RID: 9875 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002693")]
		[Address(RVA = "0x333470", Offset = "0x332470", VA = "0x180333470")]
		private void FixedUpdate()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002694 RID: 9876 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002694")]
		[Address(RVA = "0x333A20", Offset = "0x332A20", VA = "0x180333A20")]
		private IEnumerator SwitchRotation()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002695 RID: 9877 RVA: 0x00058F20 File Offset: 0x00057120
		[Token(Token = "0x6002695")]
		[Address(RVA = "0x333700", Offset = "0x332700", VA = "0x180333700")]
		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: 0x06002696 RID: 9878 RVA: 0x00058F70 File Offset: 0x00057170
		[Token(Token = "0x6002696")]
		[Address(RVA = "0x3337E0", Offset = "0x3327E0", VA = "0x1803337E0")]
		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: 0x06002697 RID: 9879 RVA: 0x00058FB8 File Offset: 0x000571B8
		[Token(Token = "0x6002697")]
		[Address(RVA = "0x333A90", Offset = "0x332A90", VA = "0x180333A90")]
		public PlatformRotator()
		{
		}

		// Token: 0x04003045 RID: 12357
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4003045")]
		public float maxAngle = 70f;

		// Token: 0x04003046 RID: 12358
		[FieldOffset(Offset = "0x1C")]
		[Token(Token = "0x4003046")]
		public float switchRotationTime = 0.5f;

		// Token: 0x04003047 RID: 12359
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4003047")]
		public float random = 0.5f;

		// Token: 0x04003048 RID: 12360
		[FieldOffset(Offset = "0x24")]
		[Token(Token = "0x4003048")]
		public float rotationSpeed = 50f;

		// Token: 0x04003049 RID: 12361
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003049")]
		public Vector3 movePosition;

		// Token: 0x0400304A RID: 12362
		[FieldOffset(Offset = "0x34")]
		[Token(Token = "0x400304A")]
		public float moveSpeed = 5f;

		// Token: 0x0400304B RID: 12363
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x400304B")]
		public int characterLayer;

		// Token: 0x0400304C RID: 12364
		[FieldOffset(Offset = "0x3C")]
		[Token(Token = "0x400304C")]
		private Quaternion defaultRotation;

		// Token: 0x0400304D RID: 12365
		[FieldOffset(Offset = "0x4C")]
		[Token(Token = "0x400304D")]
		private Quaternion targetRotation;

		// Token: 0x0400304E RID: 12366
		[FieldOffset(Offset = "0x5C")]
		[Token(Token = "0x400304E")]
		private Vector3 targetPosition;

		// Token: 0x0400304F RID: 12367
		[FieldOffset(Offset = "0x68")]
		[Token(Token = "0x400304F")]
		private Vector3 velocity;

		// Token: 0x04003050 RID: 12368
		[FieldOffset(Offset = "0x78")]
		[Token(Token = "0x4003050")]
		private Rigidbody r;
	}
}
