using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using Cpp2IlInjected;
using UnityEngine;

namespace RootMotion.FinalIK
{
	// Token: 0x0200049D RID: 1181
	[Token(Token = "0x200049D")]
	[Serializable]
	public class InteractionEffector
	{
		// Token: 0x1700029C RID: 668
		// (get) Token: 0x06002A3F RID: 10815 RVA: 0x0005E788 File Offset: 0x0005C988
		// (set) Token: 0x06002A40 RID: 10816 RVA: 0x0005E79C File Offset: 0x0005C99C
		[Token(Token = "0x1700029C")]
		public FullBodyBipedEffector effectorType
		{
			[Token(Token = "0x6002A3F")]
			[Address(RVA = "0x366270", Offset = "0x365270", VA = "0x180366270")]
			get;
			[Token(Token = "0x6002A40")]
			[Address(RVA = "0x479690", Offset = "0x478690", VA = "0x180479690")]
			private set;
		}

		// Token: 0x1700029D RID: 669
		// (get) Token: 0x06002A41 RID: 10817 RVA: 0x0005E7B0 File Offset: 0x0005C9B0
		// (set) Token: 0x06002A42 RID: 10818 RVA: 0x0005E7C4 File Offset: 0x0005C9C4
		[Token(Token = "0x1700029D")]
		public bool isPaused
		{
			[Token(Token = "0x6002A41")]
			[Address(RVA = "0x4351C0", Offset = "0x4341C0", VA = "0x1804351C0")]
			get;
			[Token(Token = "0x6002A42")]
			[Address(RVA = "0x4355E0", Offset = "0x4345E0", VA = "0x1804355E0")]
			private set;
		}

		// Token: 0x1700029E RID: 670
		// (get) Token: 0x06002A43 RID: 10819 RVA: 0x0005E7D8 File Offset: 0x0005C9D8
		// (set) Token: 0x06002A44 RID: 10820 RVA: 0x0005E7EC File Offset: 0x0005C9EC
		[Token(Token = "0x1700029E")]
		public InteractionObject interactionObject
		{
			[Token(Token = "0x6002A43")]
			[Address(RVA = "0x2EF530", Offset = "0x2EE530", VA = "0x1802EF530")]
			[CompilerGenerated]
			get
			{
				return this.<interactionObject>k__BackingField;
			}
			[Token(Token = "0x6002A44")]
			[Address(RVA = "0x475600", Offset = "0x474600", VA = "0x180475600")]
			[CompilerGenerated]
			private set
			{
				/*
An exception occurred when decompiling this method (06002A44)

ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void RootMotion.FinalIK.InteractionEffector::set_interactionObject(RootMotion.FinalIK.InteractionObject)

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	Block_0:; 	stfld:InteractionObject(InteractionEffector::<interactionObject>k__BackingField, ldloc:InteractionEffector(this), ldloc:InteractionObject(value)); }; 
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1810
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 344
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
   --- End of inner exception stack trace ---
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
   at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1618
*/;
			}
		}

		// Token: 0x1700029F RID: 671
		// (get) Token: 0x06002A45 RID: 10821 RVA: 0x0005E800 File Offset: 0x0005CA00
		[Token(Token = "0x1700029F")]
		public bool inInteraction
		{
			[Token(Token = "0x6002A45")]
			[Address(RVA = "0x1044F70", Offset = "0x1043F70", VA = "0x181044F70")]
			get
			{
				InteractionObject interactionObject = this.<interactionObject>k__BackingField;
				int num = 0;
				return interactionObject != num;
			}
		}

		// Token: 0x06002A46 RID: 10822 RVA: 0x0005E820 File Offset: 0x0005CA20
		[Token(Token = "0x6002A46")]
		[Address(RVA = "0x1044EE0", Offset = "0x1043EE0", VA = "0x181044EE0")]
		public InteractionEffector(FullBodyBipedEffector effectorType)
		{
			List<bool> list = new List();
			this.triggered = list;
			base..ctor();
			this.effectorType = effectorType;
		}

		// Token: 0x06002A47 RID: 10823 RVA: 0x0005E84C File Offset: 0x0005CA4C
		[Token(Token = "0x6002A47")]
		[Address(RVA = "0x1042E10", Offset = "0x1041E10", VA = "0x181042E10")]
		public void Initiate(InteractionSystem interactionSystem)
		{
			this.interactionSystem = interactionSystem;
			if (this.effector == (ulong)0L)
			{
				IKSolverFullBodyBiped solver = interactionSystem.fullBody.solver;
				FullBodyBipedEffector fullBodyBipedEffector = this.<effectorType>k__BackingField;
				IKEffector ikeffector = solver.GetEffector(fullBodyBipedEffector);
				this.effector = ikeffector;
				Poser component = this.effector.bone.GetComponent<Poser>();
				this.poser = component;
			}
			this.StoreDefaults();
		}

		// Token: 0x06002A48 RID: 10824 RVA: 0x0005E8B4 File Offset: 0x0005CAB4
		[Token(Token = "0x6002A48")]
		[Address(RVA = "0x1044180", Offset = "0x1043180", VA = "0x181044180")]
		private void StoreDefaults()
		{
			IKSolverFullBodyBiped solver = this.interactionSystem.fullBody.solver;
			FullBodyBipedEffector fullBodyBipedEffector = this.<effectorType>k__BackingField;
			float positionWeight = solver.GetEffector(fullBodyBipedEffector).positionWeight;
			this.defaultPositionWeight = positionWeight;
			IKSolverFullBodyBiped solver2 = this.interactionSystem.fullBody.solver;
			FullBodyBipedEffector fullBodyBipedEffector2 = this.<effectorType>k__BackingField;
			float rotationWeight = solver2.GetEffector(fullBodyBipedEffector2).rotationWeight;
			this.defaultRotationWeight = rotationWeight;
			IKSolverFullBodyBiped solver3 = this.interactionSystem.fullBody.solver;
			FullBodyBipedEffector fullBodyBipedEffector3 = this.<effectorType>k__BackingField;
			float pull = solver3.GetChain(fullBodyBipedEffector3).pull;
			this.defaultPull = pull;
			IKSolverFullBodyBiped solver4 = this.interactionSystem.fullBody.solver;
			FullBodyBipedEffector fullBodyBipedEffector4 = this.<effectorType>k__BackingField;
			float reach = solver4.GetChain(fullBodyBipedEffector4).reach;
			this.defaultReach = reach;
			IKSolverFullBodyBiped solver5 = this.interactionSystem.fullBody.solver;
			FullBodyBipedEffector fullBodyBipedEffector5 = this.<effectorType>k__BackingField;
			float push = solver5.GetChain(fullBodyBipedEffector5).push;
			this.defaultPush = push;
			IKSolverFullBodyBiped solver6 = this.interactionSystem.fullBody.solver;
			FullBodyBipedEffector fullBodyBipedEffector6 = this.<effectorType>k__BackingField;
			float pushParent = solver6.GetChain(fullBodyBipedEffector6).pushParent;
			this.defaultPushParent = pushParent;
		}

		// Token: 0x06002A49 RID: 10825 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002A49")]
		[Address(RVA = "0x1043530", Offset = "0x1042530", VA = "0x181043530")]
		public bool ResetToDefaults(float speed)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002A4A RID: 10826 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002A4A")]
		[Address(RVA = "0x1043170", Offset = "0x1042170", VA = "0x181043170")]
		public bool Pause()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002A4B RID: 10827 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002A4B")]
		[Address(RVA = "0x1043960", Offset = "0x1042960", VA = "0x181043960")]
		public bool Resume()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002A4C RID: 10828 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002A4C")]
		[Address(RVA = "0x1043A10", Offset = "0x1042A10", VA = "0x181043A10")]
		public bool Start(InteractionObject interactionObject, string tag, float fadeInTime, bool interrupt)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002A4D RID: 10829 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002A4D")]
		[Address(RVA = "0x1044600", Offset = "0x1043600", VA = "0x181044600")]
		public void Update(Transform root, float speed)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x170002A0 RID: 672
		// (get) Token: 0x06002A4E RID: 10830 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170002A0")]
		public float progress
		{
			[Token(Token = "0x6002A4E")]
			[Address(RVA = "0x1044FD0", Offset = "0x1043FD0", VA = "0x181044FD0")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x06002A4F RID: 10831 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002A4F")]
		[Address(RVA = "0x1044320", Offset = "0x1043320", VA = "0x181044320")]
		private void TriggerUntriggeredEvents(bool checkTime, out bool pickUp, out bool pause)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002A50 RID: 10832 RVA: 0x0005E9EC File Offset: 0x0005CBEC
		[Token(Token = "0x6002A50")]
		[Address(RVA = "0x10432E0", Offset = "0x10422E0", VA = "0x1810432E0")]
		private void PickUp(Transform root)
		{
			IKEffector ikeffector = this.effector;
			float z = ikeffector.position.z;
			this.pickUpPosition.z = z;
			Quaternion rotation = ikeffector.rotation;
			InteractionObject interactionObject = this.<interactionObject>k__BackingField;
			this.pickUpRotation = rotation;
			Rigidbody component = interactionObject.targetsRoot.GetComponent<Rigidbody>();
			int num = 0;
			if (component != num)
			{
				if (!component.isKinematic)
				{
					component.isKinematic = true;
				}
				Collider component2 = root.GetComponent<Collider>();
				int num2 = 0;
				if (component2 != num2)
				{
					Collider[] componentsInChildren = this.<interactionObject>k__BackingField.targetsRoot.GetComponentsInChildren<Collider>();
					int num3 = 0;
					int num4 = componentsInChildren.Length;
					if (num3 < num4)
					{
						Collider collider = componentsInChildren[num3];
						if (!collider.isTrigger)
						{
							Physics.IgnoreCollision(root.GetComponent<Collider>(), collider);
						}
						num3++;
					}
				}
			}
			InteractionSystem.InteractionDelegate onInteractionPickUp = this.interactionSystem.OnInteractionPickUp;
			if (onInteractionPickUp != 0)
			{
				InteractionObject interactionObject2 = this.<interactionObject>k__BackingField;
				FullBodyBipedEffector fullBodyBipedEffector = this.<effectorType>k__BackingField;
				onInteractionPickUp(fullBodyBipedEffector, interactionObject2);
			}
		}

		// Token: 0x06002A51 RID: 10833 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002A51")]
		[Address(RVA = "0x1043F40", Offset = "0x1042F40", VA = "0x181043F40")]
		public bool Stop()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002A52 RID: 10834 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002A52")]
		[Address(RVA = "0x1042EE0", Offset = "0x1041EE0", VA = "0x181042EE0")]
		public void OnPostFBBIK()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x040033DD RID: 13277
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x40033DD")]
		private Poser poser;

		// Token: 0x040033DE RID: 13278
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x40033DE")]
		private IKEffector effector;

		// Token: 0x040033DF RID: 13279
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x40033DF")]
		private float timer;

		// Token: 0x040033E0 RID: 13280
		[FieldOffset(Offset = "0x34")]
		[Token(Token = "0x40033E0")]
		private float length;

		// Token: 0x040033E1 RID: 13281
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x40033E1")]
		private float weight;

		// Token: 0x040033E2 RID: 13282
		[FieldOffset(Offset = "0x3C")]
		[Token(Token = "0x40033E2")]
		private float fadeInSpeed;

		// Token: 0x040033E3 RID: 13283
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x40033E3")]
		private float defaultPositionWeight;

		// Token: 0x040033E4 RID: 13284
		[FieldOffset(Offset = "0x44")]
		[Token(Token = "0x40033E4")]
		private float defaultRotationWeight;

		// Token: 0x040033E5 RID: 13285
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x40033E5")]
		private float defaultPull;

		// Token: 0x040033E6 RID: 13286
		[FieldOffset(Offset = "0x4C")]
		[Token(Token = "0x40033E6")]
		private float defaultReach;

		// Token: 0x040033E7 RID: 13287
		[FieldOffset(Offset = "0x50")]
		[Token(Token = "0x40033E7")]
		private float defaultPush;

		// Token: 0x040033E8 RID: 13288
		[FieldOffset(Offset = "0x54")]
		[Token(Token = "0x40033E8")]
		private float defaultPushParent;

		// Token: 0x040033E9 RID: 13289
		[FieldOffset(Offset = "0x58")]
		[Token(Token = "0x40033E9")]
		private float resetTimer;

		// Token: 0x040033EA RID: 13290
		[FieldOffset(Offset = "0x5C")]
		[Token(Token = "0x40033EA")]
		private bool positionWeightUsed;

		// Token: 0x040033EB RID: 13291
		[FieldOffset(Offset = "0x5D")]
		[Token(Token = "0x40033EB")]
		private bool rotationWeightUsed;

		// Token: 0x040033EC RID: 13292
		[FieldOffset(Offset = "0x5E")]
		[Token(Token = "0x40033EC")]
		private bool pullUsed;

		// Token: 0x040033ED RID: 13293
		[FieldOffset(Offset = "0x5F")]
		[Token(Token = "0x40033ED")]
		private bool reachUsed;

		// Token: 0x040033EE RID: 13294
		[FieldOffset(Offset = "0x60")]
		[Token(Token = "0x40033EE")]
		private bool pushUsed;

		// Token: 0x040033EF RID: 13295
		[FieldOffset(Offset = "0x61")]
		[Token(Token = "0x40033EF")]
		private bool pushParentUsed;

		// Token: 0x040033F0 RID: 13296
		[FieldOffset(Offset = "0x62")]
		[Token(Token = "0x40033F0")]
		private bool pickedUp;

		// Token: 0x040033F1 RID: 13297
		[FieldOffset(Offset = "0x63")]
		[Token(Token = "0x40033F1")]
		private bool defaults;

		// Token: 0x040033F2 RID: 13298
		[FieldOffset(Offset = "0x64")]
		[Token(Token = "0x40033F2")]
		private bool pickUpOnPostFBBIK;

		// Token: 0x040033F3 RID: 13299
		[FieldOffset(Offset = "0x68")]
		[Token(Token = "0x40033F3")]
		private Vector3 pickUpPosition;

		// Token: 0x040033F4 RID: 13300
		[FieldOffset(Offset = "0x74")]
		[Token(Token = "0x40033F4")]
		private Vector3 pausePositionRelative;

		// Token: 0x040033F5 RID: 13301
		[FieldOffset(Offset = "0x80")]
		[Token(Token = "0x40033F5")]
		private Quaternion pickUpRotation;

		// Token: 0x040033F6 RID: 13302
		[FieldOffset(Offset = "0x90")]
		[Token(Token = "0x40033F6")]
		private Quaternion pauseRotationRelative;

		// Token: 0x040033F7 RID: 13303
		[FieldOffset(Offset = "0xA0")]
		[Token(Token = "0x40033F7")]
		private InteractionTarget interactionTarget;

		// Token: 0x040033F8 RID: 13304
		[FieldOffset(Offset = "0xA8")]
		[Token(Token = "0x40033F8")]
		private Transform target;

		// Token: 0x040033F9 RID: 13305
		[FieldOffset(Offset = "0xB0")]
		[Token(Token = "0x40033F9")]
		private List<bool> triggered;

		// Token: 0x040033FA RID: 13306
		[FieldOffset(Offset = "0xB8")]
		[Token(Token = "0x40033FA")]
		private InteractionSystem interactionSystem;

		// Token: 0x040033FB RID: 13307
		[FieldOffset(Offset = "0xC0")]
		[Token(Token = "0x40033FB")]
		private bool started;
	}
}
