Files
NobetaSource/Cpp2IL/Assembly-CSharp/RootMotion/FinalIK/GrounderFBBIK.cs
2023-09-06 22:09:22 +02:00

261 lines
8.7 KiB
C#

using System;
using Cpp2IlInjected;
using UnityEngine;
namespace RootMotion.FinalIK
{
// Token: 0x02000406 RID: 1030
[Token(Token = "0x2000406")]
[AddComponentMenu("Scripts/RootMotion.FinalIK/Grounder/Grounder Full Body Biped")]
[HelpURL("https://www.youtube.com/watch?v=9MiZiaJorws&index=6&list=PLVxSIA1OaTOu8Nos3CalXbJ2DrKnntMv6")]
public class GrounderFBBIK : Grounder
{
// Token: 0x060024B3 RID: 9395 RVA: 0x000537F8 File Offset: 0x000519F8
[Token(Token = "0x60024B3")]
[Address(RVA = "0x11D8AE0", Offset = "0x11D72E0", VA = "0x1811D8AE0")]
[ContextMenu("TUTORIAL VIDEO")]
private void OpenTutorial()
{
Application.OpenURL("https://www.youtube.com/watch?v=9MiZiaJorws&index=6&list=PLVxSIA1OaTOu8Nos3CalXbJ2DrKnntMv6");
}
// Token: 0x060024B4 RID: 9396 RVA: 0x00053810 File Offset: 0x00051A10
[Token(Token = "0x60024B4")]
[Address(RVA = "0x11D8B20", Offset = "0x11D7320", VA = "0x1811D8B20", Slot = "5")]
[ContextMenu("User Manual")]
protected override void OpenUserManual()
{
Application.OpenURL("http://www.root-motion.com/finalikdox/html/page11.html");
}
// Token: 0x060024B5 RID: 9397 RVA: 0x00053828 File Offset: 0x00051A28
[Token(Token = "0x60024B5")]
[Address(RVA = "0x11D8AA0", Offset = "0x11D72A0", VA = "0x1811D8AA0", Slot = "6")]
[ContextMenu("Scrpt Reference")]
protected override void OpenScriptReference()
{
Application.OpenURL("http://www.root-motion.com/finalikdox/html/class_root_motion_1_1_final_i_k_1_1_grounder_f_b_b_i_k.html");
}
// Token: 0x060024B6 RID: 9398 RVA: 0x00053840 File Offset: 0x00051A40
[Token(Token = "0x60024B6")]
[Address(RVA = "0x11D8B60", Offset = "0x11D7360", VA = "0x1811D8B60", Slot = "4")]
public override void ResetPosition()
{
this.solver.Reset();
float z = Vector3.zero.z;
this.spineOffset.z = z;
}
// Token: 0x060024B7 RID: 9399 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x60024B7")]
[Address(RVA = "0x11D8210", Offset = "0x11D6A10", VA = "0x1811D8210")]
private bool IsReadyToInitiate()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x060024B8 RID: 9400 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x60024B8")]
[Address(RVA = "0x11D8D50", Offset = "0x11D7550", VA = "0x1811D8D50")]
private void Update()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x060024B9 RID: 9401 RVA: 0x00053878 File Offset: 0x00051A78
[Token(Token = "0x60024B9")]
[Address(RVA = "0x11D7F30", Offset = "0x11D6730", VA = "0x1811D7F30")]
private void FixedUpdate()
{
this.firstSolve = true;
}
// Token: 0x060024BA RID: 9402 RVA: 0x0005388C File Offset: 0x00051A8C
[Token(Token = "0x60024BA")]
[Address(RVA = "0x11D7F30", Offset = "0x11D6730", VA = "0x1811D7F30")]
private void LateUpdate()
{
this.firstSolve = true;
}
// Token: 0x060024BB RID: 9403 RVA: 0x000538A0 File Offset: 0x00051AA0
[Token(Token = "0x60024BB")]
[Address(RVA = "0x11D7F40", Offset = "0x11D6740", VA = "0x1811D7F40")]
private void Initiate()
{
this.ik.solver.leftLegMapping.maintainRotationWeight = 1f;
this.ik.solver.rightLegMapping.maintainRotationWeight = 1f;
Transform[] array = new Transform[2];
this.feet = array;
FullBodyBipedIK fullBodyBipedIK = this.ik;
Transform[] array2 = this.feet;
IKEffector leftFootEffector = fullBodyBipedIK.solver.leftFootEffector;
Transform bone = leftFootEffector.bone;
if (bone == 0 || leftFootEffector != 0)
{
array2[0] = bone;
FullBodyBipedIK fullBodyBipedIK2 = this.ik;
Transform[] array3 = this.feet;
IKEffector rightFootEffector = fullBodyBipedIK2.solver.rightFootEffector;
Transform bone2 = rightFootEffector.bone;
if (bone2 == 0 || rightFootEffector != 0)
{
array3[1] = bone2;
IKSolverFullBodyBiped solver = this.ik.solver;
IKSolver.UpdateDelegate onPreUpdate = solver.OnPreUpdate;
IKSolver.UpdateDelegate updateDelegate = new IKSolver.UpdateDelegate(this.OnSolverUpdate);
Delegate @delegate = Delegate.Combine(onPreUpdate, updateDelegate);
if (@delegate == 0 || @delegate != 0)
{
solver.OnPreUpdate = @delegate;
BipedReferences references = this.ik.references;
Grounding solver2 = this.solver;
Transform[] array4 = this.feet;
Transform root = references.root;
solver2.Initiate(root, array4);
this.initiated = true;
return;
}
}
}
throw new InvalidCastException();
}
// Token: 0x060024BC RID: 9404 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x60024BC")]
[Address(RVA = "0x11D8540", Offset = "0x11D6D40", VA = "0x1811D8540")]
private void OnSolverUpdate()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x060024BD RID: 9405 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x60024BD")]
[Address(RVA = "0x11D8BA0", Offset = "0x11D73A0", VA = "0x1811D8BA0")]
private void SetLegIK(IKEffector effector, Grounding.Leg leg)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x060024BE RID: 9406 RVA: 0x000539EC File Offset: 0x00051BEC
[Token(Token = "0x60024BE")]
[Address(RVA = "0x11D83E0", Offset = "0x11D6BE0", VA = "0x1811D83E0")]
private void OnDrawGizmosSelected()
{
FullBodyBipedIK fullBodyBipedIK = this.ik;
int num = 0;
if (fullBodyBipedIK == num)
{
FullBodyBipedIK component = base.GetComponent<FullBodyBipedIK>();
this.ik = component;
}
FullBodyBipedIK fullBodyBipedIK2 = this.ik;
int num2 = 0;
if (fullBodyBipedIK2 == num2)
{
FullBodyBipedIK componentInParent = base.GetComponentInParent<FullBodyBipedIK>();
this.ik = componentInParent;
}
FullBodyBipedIK fullBodyBipedIK3 = this.ik;
int num3 = 0;
if (fullBodyBipedIK3 == num3)
{
FullBodyBipedIK componentInChildren = base.GetComponentInChildren<FullBodyBipedIK>();
this.ik = componentInChildren;
}
}
// Token: 0x060024BF RID: 9407 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x60024BF")]
[Address(RVA = "0x11D82B0", Offset = "0x11D6AB0", VA = "0x1811D82B0")]
private void OnDestroy()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x060024C0 RID: 9408 RVA: 0x00053A68 File Offset: 0x00051C68
[Token(Token = "0x60024C0")]
[Address(RVA = "0x11D8E30", Offset = "0x11D7630", VA = "0x1811D8E30")]
public GrounderFBBIK()
{
int num = 0;
this.spineSpeed = 3f;
GrounderFBBIK.SpineEffector[] array = new GrounderFBBIK.SpineEffector[num];
this.spine = array;
Transform[] array2 = new Transform[2];
this.feet = array2;
base..ctor();
}
// Token: 0x04002E71 RID: 11889
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x4002E71")]
[Tooltip("Reference to the FBBIK componet.")]
public FullBodyBipedIK ik;
// Token: 0x04002E72 RID: 11890
[FieldOffset(Offset = "0x48")]
[Token(Token = "0x4002E72")]
[Tooltip("The amount of spine bending towards upward slopes.")]
public float spineBend = 2f;
// Token: 0x04002E73 RID: 11891
[FieldOffset(Offset = "0x4C")]
[Token(Token = "0x4002E73")]
[Tooltip("The interpolation speed of spine bending.")]
public float spineSpeed;
// Token: 0x04002E74 RID: 11892
[FieldOffset(Offset = "0x50")]
[Token(Token = "0x4002E74")]
public GrounderFBBIK.SpineEffector[] spine;
// Token: 0x04002E75 RID: 11893
[FieldOffset(Offset = "0x58")]
[Token(Token = "0x4002E75")]
private Transform[] feet;
// Token: 0x04002E76 RID: 11894
[FieldOffset(Offset = "0x60")]
[Token(Token = "0x4002E76")]
private Vector3 spineOffset;
// Token: 0x04002E77 RID: 11895
[FieldOffset(Offset = "0x6C")]
[Token(Token = "0x4002E77")]
private bool firstSolve;
// Token: 0x02000407 RID: 1031
[Token(Token = "0x2000407")]
[Serializable]
public class SpineEffector
{
// Token: 0x060024C1 RID: 9409 RVA: 0x00053AB0 File Offset: 0x00051CB0
[Token(Token = "0x60024C1")]
[Address(RVA = "0x670620", Offset = "0x66EE20", VA = "0x180670620")]
public SpineEffector()
{
}
// Token: 0x04002E78 RID: 11896
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4002E78")]
[Tooltip("The type of the effector.")]
public FullBodyBipedEffector effectorType;
// Token: 0x04002E79 RID: 11897
[FieldOffset(Offset = "0x14")]
[Token(Token = "0x4002E79")]
[Tooltip("The weight of horizontal bend offset towards the slope.")]
public float horizontalWeight = 1f;
// Token: 0x04002E7A RID: 11898
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4002E7A")]
[Tooltip("The vertical bend offset weight.")]
public float verticalWeight;
}
}
}