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

namespace RootMotion.Demos
{
	// Token: 0x020003D1 RID: 977
	[Token(Token = "0x20003D1")]
	[RequireComponent(typeof(Recoil))]
	public class RecoilTest : MonoBehaviour
	{
		// Token: 0x06002397 RID: 9111 RVA: 0x000516AC File Offset: 0x0004F8AC
		[Token(Token = "0x6002397")]
		[Address(RVA = "0xBE5B90", Offset = "0xBE4990", VA = "0x180BE5B90")]
		private void Start()
		{
			/*
An exception occurred when decompiling this method (06002397)

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

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	Block_0:; 	stloc:Recoil(var_0_06, call:Recoil(Component::GetComponent, ldloc:RecoilTest[exp:Component](this))); 	stfld:Recoil(RecoilTest::recoil, ldloc:RecoilTest(this), ldloc:Recoil(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: 0x06002398 RID: 9112 RVA: 0x000516C8 File Offset: 0x0004F8C8
		[Token(Token = "0x6002398")]
		[Address(RVA = "0xBE5BE0", Offset = "0xBE49E0", VA = "0x180BE5BE0")]
		private void Update()
		{
			if (Input.GetKeyDownInt(KeyCode.R) || Input.GetMouseButtonDown(0))
			{
				Recoil recoil = this.recoil;
				float num = this.magnitude;
				recoil.Fire(num);
				return;
			}
		}

		// Token: 0x06002399 RID: 9113 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002399")]
		[Address(RVA = "0xBE5B40", Offset = "0xBE4940", VA = "0x180BE5B40")]
		private void OnGUI()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600239A RID: 9114 RVA: 0x00051704 File Offset: 0x0004F904
		[Token(Token = "0x600239A")]
		[Address(RVA = "0xBE5C30", Offset = "0xBE4A30", VA = "0x180BE5C30")]
		public RecoilTest()
		{
		}

		// Token: 0x04002D28 RID: 11560
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4002D28")]
		public float magnitude = 1f;

		// Token: 0x04002D29 RID: 11561
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4002D29")]
		private Recoil recoil;
	}
}
