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

namespace RootMotion.Demos
{
	// Token: 0x020003C4 RID: 964
	[Token(Token = "0x20003C4")]
	public class KissingRig : MonoBehaviour
	{
		// Token: 0x06002367 RID: 9063 RVA: 0x000510E8 File Offset: 0x0004F2E8
		[Token(Token = "0x6002367")]
		[Address(RVA = "0x10E29B0", Offset = "0x10E17B0", VA = "0x1810E29B0")]
		private void Start()
		{
			this.partner1.Initiate();
			this.partner2.Initiate();
		}

		// Token: 0x06002368 RID: 9064 RVA: 0x00051114 File Offset: 0x0004F314
		[Token(Token = "0x6002368")]
		[Address(RVA = "0x10E2950", Offset = "0x10E1750", VA = "0x1810E2950")]
		private void LateUpdate()
		{
			int num = 0;
			if (this.iterations > num)
			{
				KissingRig.Partner partner = this.partner1;
				float num2 = this.weight;
				partner.Update(num2);
				KissingRig.Partner partner2 = this.partner2;
				float num3 = this.weight;
				partner2.Update(num3);
				num++;
			}
		}

		// Token: 0x06002369 RID: 9065 RVA: 0x00051164 File Offset: 0x0004F364
		[Token(Token = "0x6002369")]
		[Address(RVA = "0x10E29F0", Offset = "0x10E17F0", VA = "0x1810E29F0")]
		public KissingRig()
		{
		}

		// Token: 0x04002CE4 RID: 11492
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4002CE4")]
		public KissingRig.Partner partner1;

		// Token: 0x04002CE5 RID: 11493
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4002CE5")]
		public KissingRig.Partner partner2;

		// Token: 0x04002CE6 RID: 11494
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4002CE6")]
		public float weight;

		// Token: 0x04002CE7 RID: 11495
		[FieldOffset(Offset = "0x2C")]
		[Token(Token = "0x4002CE7")]
		public int iterations = (int)((ulong)3L);

		// Token: 0x020003C5 RID: 965
		[Token(Token = "0x20003C5")]
		[Serializable]
		public class Partner
		{
			// Token: 0x0600236A RID: 9066 RVA: 0x00051180 File Offset: 0x0004F380
			[Token(Token = "0x600236A")]
			[Address(RVA = "0xA6AE50", Offset = "0xA69C50", VA = "0x180A6AE50")]
			public void Initiate()
			{
				FullBodyBipedIK fullBodyBipedIK = this.ik;
				int num = 0;
				fullBodyBipedIK.enabled = num != 0;
			}

			// Token: 0x0600236B RID: 9067 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x600236B")]
			[Address(RVA = "0x14F1C40", Offset = "0x14F0A40", VA = "0x1814F1C40")]
			public void Update(float weight)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x170001FD RID: 509
			// (get) Token: 0x0600236C RID: 9068 RVA: 0x000511A4 File Offset: 0x0004F3A4
			[Token(Token = "0x170001FD")]
			private Transform neck
			{
				[Token(Token = "0x600236C")]
				[Address(RVA = "0x14F2580", Offset = "0x14F1380", VA = "0x1814F2580")]
				get
				{
					Transform[] spineBones = this.ik.solver.spineMapping.spineBones;
					int num = spineBones.Length - 1;
					return spineBones[num];
				}
			}

			// Token: 0x0600236D RID: 9069 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x600236D")]
			[Address(RVA = "0x14F19E0", Offset = "0x14F07E0", VA = "0x1814F19E0")]
			private void InverseTransformEffector(FullBodyBipedEffector effector, Transform target, Vector3 targetPosition, float weight)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x0600236E RID: 9070 RVA: 0x000511E0 File Offset: 0x0004F3E0
			[Token(Token = "0x600236E")]
			[Address(RVA = "0x14F2550", Offset = "0x14F1350", VA = "0x1814F2550")]
			public Partner()
			{
			}

			// Token: 0x04002CE8 RID: 11496
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x4002CE8")]
			public FullBodyBipedIK ik;

			// Token: 0x04002CE9 RID: 11497
			[FieldOffset(Offset = "0x18")]
			[Token(Token = "0x4002CE9")]
			public Transform mouth;

			// Token: 0x04002CEA RID: 11498
			[FieldOffset(Offset = "0x20")]
			[Token(Token = "0x4002CEA")]
			public Transform mouthTarget;

			// Token: 0x04002CEB RID: 11499
			[FieldOffset(Offset = "0x28")]
			[Token(Token = "0x4002CEB")]
			public Transform touchTargetLeftHand;

			// Token: 0x04002CEC RID: 11500
			[FieldOffset(Offset = "0x30")]
			[Token(Token = "0x4002CEC")]
			public Transform touchTargetRightHand;

			// Token: 0x04002CED RID: 11501
			[FieldOffset(Offset = "0x38")]
			[Token(Token = "0x4002CED")]
			public float bodyWeightHorizontal = 0.4f;

			// Token: 0x04002CEE RID: 11502
			[FieldOffset(Offset = "0x3C")]
			[Token(Token = "0x4002CEE")]
			public float bodyWeightVertical = 1f;

			// Token: 0x04002CEF RID: 11503
			[FieldOffset(Offset = "0x40")]
			[Token(Token = "0x4002CEF")]
			public float neckRotationWeight = 0.3f;

			// Token: 0x04002CF0 RID: 11504
			[FieldOffset(Offset = "0x44")]
			[Token(Token = "0x4002CF0")]
			public float headTiltAngle = 10f;

			// Token: 0x04002CF1 RID: 11505
			[FieldOffset(Offset = "0x48")]
			[Token(Token = "0x4002CF1")]
			public Vector3 headTiltAxis;

			// Token: 0x04002CF2 RID: 11506
			[FieldOffset(Offset = "0x54")]
			[Token(Token = "0x4002CF2")]
			private Quaternion neckRotation;
		}
	}
}
