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

namespace RootMotion.Demos
{
	// Token: 0x020003BB RID: 955
	[Token(Token = "0x20003BB")]
	public class FBIKBoxing : MonoBehaviour
	{
		// Token: 0x06002346 RID: 9030 RVA: 0x00050E48 File Offset: 0x0004F048
		[Token(Token = "0x6002346")]
		[Address(RVA = "0x4B7E70", Offset = "0x4B6C70", VA = "0x1804B7E70")]
		private void Start()
		{
			/*
An exception occurred when decompiling this method (06002346)

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: 0x06002347 RID: 9031 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002347")]
		[Address(RVA = "0x4B7C60", Offset = "0x4B6A60", VA = "0x1804B7C60")]
		private void LateUpdate()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002348 RID: 9032 RVA: 0x00050E64 File Offset: 0x0004F064
		[Token(Token = "0x6002348")]
		[Address(RVA = "0x3088F0", Offset = "0x3076F0", VA = "0x1803088F0")]
		public FBIKBoxing()
		{
		}

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

		// Token: 0x04002CAD RID: 11437
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4002CAD")]
		[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: 0x04002CAE RID: 11438
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4002CAE")]
		[Tooltip("The Full Body Biped IK component")]
		public FullBodyBipedIK ik;

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

		// Token: 0x04002CB0 RID: 11440
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4002CB0")]
		[Tooltip("The master weight")]
		public float weight;

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

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

		// Token: 0x04002CB3 RID: 11443
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x4002CB3")]
		private Animator animator;
	}
}
