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

namespace RootMotion.Demos
{
	// Token: 0x02000413 RID: 1043
	[Token(Token = "0x2000413")]
	public class FBIKBoxing : MonoBehaviour
	{
		// Token: 0x0600260F RID: 9743 RVA: 0x000580F4 File Offset: 0x000562F4
		[Token(Token = "0x600260F")]
		[Address(RVA = "0xD13BB0", Offset = "0xD12BB0", VA = "0x180D13BB0")]
		private void Start()
		{
			/*
An exception occurred when decompiling this method (0600260F)

ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void RootMotion.Demos.FBIKBoxing::Start()

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	Block_0:; 	stloc:Animator(var_0_06, call:Animator(Component::GetComponent, ldloc:FBIKBoxing[exp:Component](this))); 	stfld:Animator(FBIKBoxing::animator, ldloc:FBIKBoxing(this), ldloc:Animator(var_0_06)); }; 
   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: 0x06002610 RID: 9744 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002610")]
		[Address(RVA = "0xD139A0", Offset = "0xD129A0", VA = "0x180D139A0")]
		private void LateUpdate()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002611 RID: 9745 RVA: 0x00058110 File Offset: 0x00056310
		[Token(Token = "0x6002611")]
		[Address(RVA = "0x328C40", Offset = "0x327C40", VA = "0x180328C40")]
		public FBIKBoxing()
		{
		}

		// Token: 0x04002F96 RID: 12182
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4002F96")]
		[Tooltip("The target we want to hit")]
		public Transform target;

		// Token: 0x04002F97 RID: 12183
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4002F97")]
		[Tooltip("The pin Transform is used to reference the exact hit point in the animation (used by AimIK to aim the upper body to follow the target).In Legacy and Generic modes you can just create and position a reference point in your animating software and include it in the FBX. Then in Unity if you added a GameObject with the exact same name under the character's root, it would be animated to the required position.In Humanoid mode however, Mecanim loses track of any Transform that does not belong to the avatar, so in this case the pin point has to be manually set inside the Unity Editor.")]
		public Transform pin;

		// Token: 0x04002F98 RID: 12184
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4002F98")]
		[Tooltip("The Full Body Biped IK component")]
		public FullBodyBipedIK ik;

		// Token: 0x04002F99 RID: 12185
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4002F99")]
		[Tooltip("The Aim IK component. Aim IK is ust used for following the target slightly with the body.")]
		public AimIK aim;

		// Token: 0x04002F9A RID: 12186
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4002F9A")]
		[Tooltip("The master weight")]
		public float weight;

		// Token: 0x04002F9B RID: 12187
		[FieldOffset(Offset = "0x3C")]
		[Token(Token = "0x4002F9B")]
		[Tooltip("The effector type of the punching hand")]
		public FullBodyBipedEffector effector;

		// Token: 0x04002F9C RID: 12188
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4002F9C")]
		[Tooltip("Weight of aiming the body to follow the target")]
		public AnimationCurve aimWeight;

		// Token: 0x04002F9D RID: 12189
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x4002F9D")]
		private Animator animator;
	}
}
