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

namespace RootMotion.Demos
{
	// Token: 0x0200041C RID: 1052
	[Token(Token = "0x200041C")]
	public class KissingRig : MonoBehaviour
	{
		// Token: 0x06002630 RID: 9776 RVA: 0x00058340 File Offset: 0x00056540
		[Token(Token = "0x6002630")]
		[Address(RVA = "0x10528D0", Offset = "0x10518D0", VA = "0x1810528D0")]
		private void Start()
		{
			this.partner1.Initiate();
			this.partner2.Initiate();
		}

		// Token: 0x06002631 RID: 9777 RVA: 0x0005836C File Offset: 0x0005656C
		[Token(Token = "0x6002631")]
		[Address(RVA = "0x1052870", Offset = "0x1051870", VA = "0x181052870")]
		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: 0x06002632 RID: 9778 RVA: 0x000583BC File Offset: 0x000565BC
		[Token(Token = "0x6002632")]
		[Address(RVA = "0x1052910", Offset = "0x1051910", VA = "0x181052910")]
		public KissingRig()
		{
		}

		// Token: 0x04002FCE RID: 12238
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4002FCE")]
		public KissingRig.Partner partner1;

		// Token: 0x04002FCF RID: 12239
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4002FCF")]
		public KissingRig.Partner partner2;

		// Token: 0x04002FD0 RID: 12240
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4002FD0")]
		public float weight;

		// Token: 0x04002FD1 RID: 12241
		[FieldOffset(Offset = "0x2C")]
		[Token(Token = "0x4002FD1")]
		public int iterations = (int)((ulong)3L);

		// Token: 0x0200041D RID: 1053
		[Token(Token = "0x200041D")]
		[Serializable]
		public class Partner
		{
			// Token: 0x06002633 RID: 9779 RVA: 0x000583D8 File Offset: 0x000565D8
			[Token(Token = "0x6002633")]
			[Address(RVA = "0x69A4C0", Offset = "0x6994C0", VA = "0x18069A4C0")]
			public void Initiate()
			{
				FullBodyBipedIK fullBodyBipedIK = this.ik;
				int num = 0;
				fullBodyBipedIK.enabled = num != 0;
			}

			// Token: 0x06002634 RID: 9780 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002634")]
			[Address(RVA = "0x69A750", Offset = "0x699750", VA = "0x18069A750")]
			public void Update(float weight)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x17000222 RID: 546
			// (get) Token: 0x06002635 RID: 9781 RVA: 0x000583FC File Offset: 0x000565FC
			[Token(Token = "0x17000222")]
			private Transform neck
			{
				[Token(Token = "0x6002635")]
				[Address(RVA = "0x69B090", Offset = "0x69A090", VA = "0x18069B090")]
				get
				{
					Transform[] spineBones = this.ik.solver.spineMapping.spineBones;
					int num = spineBones.Length - 1;
					return spineBones[num];
				}
			}

			// Token: 0x06002636 RID: 9782 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002636")]
			[Address(RVA = "0x69A4F0", Offset = "0x6994F0", VA = "0x18069A4F0")]
			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: 0x06002637 RID: 9783 RVA: 0x00058438 File Offset: 0x00056638
			[Token(Token = "0x6002637")]
			[Address(RVA = "0x69B060", Offset = "0x69A060", VA = "0x18069B060")]
			public Partner()
			{
			}

			// Token: 0x04002FD2 RID: 12242
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x4002FD2")]
			public FullBodyBipedIK ik;

			// Token: 0x04002FD3 RID: 12243
			[FieldOffset(Offset = "0x18")]
			[Token(Token = "0x4002FD3")]
			public Transform mouth;

			// Token: 0x04002FD4 RID: 12244
			[FieldOffset(Offset = "0x20")]
			[Token(Token = "0x4002FD4")]
			public Transform mouthTarget;

			// Token: 0x04002FD5 RID: 12245
			[FieldOffset(Offset = "0x28")]
			[Token(Token = "0x4002FD5")]
			public Transform touchTargetLeftHand;

			// Token: 0x04002FD6 RID: 12246
			[FieldOffset(Offset = "0x30")]
			[Token(Token = "0x4002FD6")]
			public Transform touchTargetRightHand;

			// Token: 0x04002FD7 RID: 12247
			[FieldOffset(Offset = "0x38")]
			[Token(Token = "0x4002FD7")]
			public float bodyWeightHorizontal = 0.4f;

			// Token: 0x04002FD8 RID: 12248
			[FieldOffset(Offset = "0x3C")]
			[Token(Token = "0x4002FD8")]
			public float bodyWeightVertical = 1f;

			// Token: 0x04002FD9 RID: 12249
			[FieldOffset(Offset = "0x40")]
			[Token(Token = "0x4002FD9")]
			public float neckRotationWeight = 0.3f;

			// Token: 0x04002FDA RID: 12250
			[FieldOffset(Offset = "0x44")]
			[Token(Token = "0x4002FDA")]
			public float headTiltAngle = 10f;

			// Token: 0x04002FDB RID: 12251
			[FieldOffset(Offset = "0x48")]
			[Token(Token = "0x4002FDB")]
			public Vector3 headTiltAxis;

			// Token: 0x04002FDC RID: 12252
			[FieldOffset(Offset = "0x54")]
			[Token(Token = "0x4002FDC")]
			private Quaternion neckRotation;
		}
	}
}
