using System;
using Cpp2IlInjected;
using RootMotion.FinalIK;
using UnityEngine;

namespace RootMotion.Demos
{
	// Token: 0x02000414 RID: 1044
	[Token(Token = "0x2000414")]
	public class FBIKHandsOnProp : MonoBehaviour
	{
		// Token: 0x06002612 RID: 9746 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002612")]
		[Address(RVA = "0xD17530", Offset = "0xD16530", VA = "0x180D17530")]
		private void Awake()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002613 RID: 9747 RVA: 0x00058124 File Offset: 0x00056324
		[Token(Token = "0x6002613")]
		[Address(RVA = "0xD17E20", Offset = "0xD16E20", VA = "0x180D17E20")]
		private void OnPreRead()
		{
			FullBodyBipedIK fullBodyBipedIK = this.ik;
			if (!this.leftHanded)
			{
				IKEffector rightHandEffector = fullBodyBipedIK.solver.rightHandEffector;
				IKEffector leftHandEffector = this.ik.solver.leftHandEffector;
			}
			IKEffector leftHandEffector2 = fullBodyBipedIK.solver.leftHandEffector;
			IKEffector rightHandEffector2 = this.ik.solver.rightHandEffector;
			this.HandsOnProp(leftHandEffector2, rightHandEffector2);
		}

		// Token: 0x06002614 RID: 9748 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002614")]
		[Address(RVA = "0xD17620", Offset = "0xD16620", VA = "0x180D17620")]
		private void HandsOnProp(IKEffector mainHand, IKEffector otherHand)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002615 RID: 9749 RVA: 0x0005818C File Offset: 0x0005638C
		[Token(Token = "0x6002615")]
		[Address(RVA = "0xD17CF0", Offset = "0xD16CF0", VA = "0x180D17CF0")]
		private void OnDestroy()
		{
			FullBodyBipedIK fullBodyBipedIK = this.ik;
			int num = 0;
			if (fullBodyBipedIK != num)
			{
				IKSolverFullBodyBiped solver = this.ik.solver;
				IKSolver.UpdateDelegate onPreRead = solver.OnPreRead;
				IKSolver.UpdateDelegate updateDelegate = new IKSolver.UpdateDelegate(this.OnPreRead);
				Delegate @delegate = Delegate.Remove(onPreRead, updateDelegate);
				int num2 = 0;
				if (@delegate != 0 && @delegate == 0)
				{
					throw new InvalidCastException();
				}
				solver.OnPreRead = num2;
			}
		}

		// Token: 0x06002616 RID: 9750 RVA: 0x000581F8 File Offset: 0x000563F8
		[Token(Token = "0x6002616")]
		[Address(RVA = "0x328C40", Offset = "0x327C40", VA = "0x180328C40")]
		public FBIKHandsOnProp()
		{
		}

		// Token: 0x04002F9E RID: 12190
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4002F9E")]
		public FullBodyBipedIK ik;

		// Token: 0x04002F9F RID: 12191
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4002F9F")]
		public bool leftHanded;
	}
}
