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

// Token: 0x0200030F RID: 783
[Token(Token = "0x200030F")]
[Serializable]
public class NobetaSkinController
{
	// Token: 0x170001B6 RID: 438
	// (get) Token: 0x06001F27 RID: 7975 RVA: 0x0004B124 File Offset: 0x00049324
	[Token(Token = "0x170001B6")]
	public Transform AimTarget
	{
		[Token(Token = "0x6001F27")]
		[Address(RVA = "0x31E390", Offset = "0x31D190", VA = "0x18031E390")]
		get
		{
			return this.aimTarget;
		}
	}

	// Token: 0x170001B7 RID: 439
	// (get) Token: 0x06001F28 RID: 7976 RVA: 0x0004B138 File Offset: 0x00049338
	[Token(Token = "0x170001B7")]
	public Transform LookAtObject
	{
		[Token(Token = "0x6001F28")]
		[Address(RVA = "0x3147B0", Offset = "0x3135B0", VA = "0x1803147B0")]
		get
		{
			return this.lookAtObject;
		}
	}

	// Token: 0x06001F29 RID: 7977 RVA: 0x0004B14C File Offset: 0x0004934C
	[Token(Token = "0x6001F29")]
	[Address(RVA = "0xECFF80", Offset = "0xECED80", VA = "0x180ECFF80")]
	public void Init(NobetaAnimatorController animator, Transform aimTarget, Transform lookAtObject)
	{
		/*
An exception occurred when decompiling this method (06001F29)

ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void NobetaSkinController::Init(NobetaAnimatorController,UnityEngine.Transform,UnityEngine.Transform)

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	Block_0:; 	stfld:NobetaAnimatorController(NobetaSkinController::animator, ldloc:NobetaSkinController(this), ldloc:NobetaAnimatorController(animator)); 	stfld:Transform(NobetaSkinController::aimTarget, ldloc:NobetaSkinController(this), ldloc:Transform(aimTarget)); 	stfld:Transform(NobetaSkinController::lookAtObject, ldloc:NobetaSkinController(this), ldloc:Transform(lookAtObject)); }; 
   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: 0x06001F2A RID: 7978 RVA: 0x0004B170 File Offset: 0x00049370
	[Token(Token = "0x6001F2A")]
	[Address(RVA = "0xED0350", Offset = "0xECF150", VA = "0x180ED0350")]
	public void Setup(NobetaSkin skin)
	{
		Transform transform = skin.transform;
		this.source = transform;
		NobetaIKController ikController = skin.ikController;
		this.ik = ikController;
		throw new NullReferenceException();
	}

	// Token: 0x06001F2B RID: 7979 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001F2B")]
	[Address(RVA = "0xED03A0", Offset = "0xECF1A0", VA = "0x180ED03A0")]
	public void Update(float deltaTime)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001F2C RID: 7980 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001F2C")]
	[Address(RVA = "0xECF910", Offset = "0xECE710", VA = "0x180ECF910")]
	public void CalculateAimSystem(float deltaTime)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001F2D RID: 7981 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001F2D")]
	[Address(RVA = "0xECFA20", Offset = "0xECE820", VA = "0x180ECFA20")]
	public void CalculateLookAtSystem(float deltaTime)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001F2E RID: 7982 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001F2E")]
	[Address(RVA = "0xED01C0", Offset = "0xECEFC0", VA = "0x180ED01C0")]
	public void SetScriptLookAtTarget(Transform target, bool lerp = true)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001F2F RID: 7983 RVA: 0x0004B1A0 File Offset: 0x000493A0
	[Token(Token = "0x6001F2F")]
	[Address(RVA = "0xED0090", Offset = "0xECEE90", VA = "0x180ED0090")]
	public void SetLookAtTarget(bool isScriptEnable, [Optional] Transform target)
	{
		if (!(this.lookAtTarget == target))
		{
			Transform transform = this.scriptLookAtTarget;
			int num = 0;
			if (transform != num)
			{
				if (!isScriptEnable)
				{
					goto IL_39;
				}
				int num2 = 0;
				if (!(target != num2))
				{
				}
			}
			this.lookAtTarget = target;
			IL_39:
			this.scriptStopTimer = 2f;
			this.lookAtTarget = (ulong)0L;
		}
	}

	// Token: 0x06001F30 RID: 7984 RVA: 0x0004B1FC File Offset: 0x000493FC
	[Token(Token = "0x6001F30")]
	[Address(RVA = "0x6E7200", Offset = "0x6E6000", VA = "0x1806E7200")]
	public void SetAimIKWeight(float aimIKStayTime)
	{
		this.aimIKStayTime = aimIKStayTime;
	}

	// Token: 0x06001F31 RID: 7985 RVA: 0x0004B210 File Offset: 0x00049410
	[Token(Token = "0x6001F31")]
	[Address(RVA = "0xECFFE0", Offset = "0xECEDE0", VA = "0x180ECFFE0")]
	public void SetIKZero(bool isIK)
	{
		if (isIK)
		{
			NobetaIKController nobetaIKController = this.ik;
			this.aimIKWeight = 0f;
			IKSolverAim solver = nobetaIKController.aimIK.solver;
			int num = 0;
			solver.SetIKPositionWeight((float)num);
		}
		this.scriptStopTimer = 2f;
		NobetaIKController nobetaIKController2 = this.ik;
		IKSolverLookAt solver2 = nobetaIKController2.lookAtIK.solver;
		int num2 = 0;
		solver2.SetLookAtWeight((float)num2);
		IKSolverCCD solver3 = nobetaIKController2.hairIK.solver;
		int num3 = 0;
		solver3.SetIKPositionWeight((float)num3);
	}

	// Token: 0x06001F32 RID: 7986 RVA: 0x0004B294 File Offset: 0x00049494
	[Token(Token = "0x6001F32")]
	[Address(RVA = "0x3D8B20", Offset = "0x3D7920", VA = "0x1803D8B20")]
	public NobetaSkinController()
	{
	}

	// Token: 0x040028F1 RID: 10481
	[Cpp2IlInjected.FieldOffset(Offset = "0x10")]
	[Token(Token = "0x40028F1")]
	[SerializeField]
	private float aimIKWeight;

	// Token: 0x040028F2 RID: 10482
	[Cpp2IlInjected.FieldOffset(Offset = "0x14")]
	[Token(Token = "0x40028F2")]
	[SerializeField]
	private float aimIKStayTime;

	// Token: 0x040028F3 RID: 10483
	[Cpp2IlInjected.FieldOffset(Offset = "0x18")]
	[Token(Token = "0x40028F3")]
	[SerializeField]
	private float lookAtWeight;

	// Token: 0x040028F4 RID: 10484
	[Cpp2IlInjected.FieldOffset(Offset = "0x20")]
	[Token(Token = "0x40028F4")]
	[SerializeField]
	private Transform lookAtTarget;

	// Token: 0x040028F5 RID: 10485
	[Cpp2IlInjected.FieldOffset(Offset = "0x28")]
	[Token(Token = "0x40028F5")]
	[SerializeField]
	private Transform scriptLookAtTarget;

	// Token: 0x040028F6 RID: 10486
	[Cpp2IlInjected.FieldOffset(Offset = "0x30")]
	[Token(Token = "0x40028F6")]
	[SerializeField]
	private float scriptStopTimer;

	// Token: 0x040028F7 RID: 10487
	[Token(Token = "0x40028F7")]
	private const float SCRIPT_STOP_TIME = 2f;

	// Token: 0x040028F8 RID: 10488
	[Cpp2IlInjected.FieldOffset(Offset = "0x38")]
	[Token(Token = "0x40028F8")]
	private NobetaAnimatorController animator;

	// Token: 0x040028F9 RID: 10489
	[Cpp2IlInjected.FieldOffset(Offset = "0x40")]
	[Token(Token = "0x40028F9")]
	private Transform aimTarget;

	// Token: 0x040028FA RID: 10490
	[Cpp2IlInjected.FieldOffset(Offset = "0x48")]
	[Token(Token = "0x40028FA")]
	private Transform lookAtObject;

	// Token: 0x040028FB RID: 10491
	[Cpp2IlInjected.FieldOffset(Offset = "0x50")]
	[Token(Token = "0x40028FB")]
	private Transform source;

	// Token: 0x040028FC RID: 10492
	[Cpp2IlInjected.FieldOffset(Offset = "0x58")]
	[Token(Token = "0x40028FC")]
	private NobetaIKController ik;
}
