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

137 lines
3.6 KiB
C#

using System;
using Cpp2IlInjected;
using UnityEngine;
namespace RootMotion.FinalIK
{
// Token: 0x02000415 RID: 1045
[Token(Token = "0x2000415")]
public class IKExecutionOrder : MonoBehaviour
{
// Token: 0x17000221 RID: 545
// (get) Token: 0x0600254C RID: 9548 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x17000221")]
private bool animatePhysics
{
[Token(Token = "0x600254C")]
[Address(RVA = "0x11E5CB0", Offset = "0x11E44B0", VA = "0x1811E5CB0")]
get
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
}
// Token: 0x0600254D RID: 9549 RVA: 0x00054448 File Offset: 0x00052648
[Token(Token = "0x600254D")]
[Address(RVA = "0x11E5C00", Offset = "0x11E4400", VA = "0x1811E5C00")]
private void Start()
{
IK[] ikcomponents = this.IKComponents;
int num = 0;
if (num < ikcomponents.Length)
{
IK ik = ikcomponents[num];
int num2 = 0;
ik.enabled = num2 != 0;
IK[] ikcomponents2 = this.IKComponents;
num++;
}
}
// Token: 0x0600254E RID: 9550 RVA: 0x0005448C File Offset: 0x0005268C
[Token(Token = "0x600254E")]
[Address(RVA = "0x11E5C80", Offset = "0x11E4480", VA = "0x1811E5C80")]
private void Update()
{
if (!this.animatePhysics)
{
this.FixTransforms();
return;
}
}
// Token: 0x0600254F RID: 9551 RVA: 0x000544AC File Offset: 0x000526AC
[Token(Token = "0x600254F")]
[Address(RVA = "0x11E5AB0", Offset = "0x11E42B0", VA = "0x1811E5AB0")]
private void FixedUpdate()
{
this.fixedFrame = true;
if (this.animatePhysics)
{
this.FixTransforms();
return;
}
}
// Token: 0x06002550 RID: 9552 RVA: 0x000544D0 File Offset: 0x000526D0
[Token(Token = "0x6002550")]
[Address(RVA = "0x11E5AE0", Offset = "0x11E42E0", VA = "0x1811E5AE0")]
private void LateUpdate()
{
if (!this.animatePhysics || this.fixedFrame)
{
IK[] ikcomponents = this.IKComponents;
int num = 0;
if (num < ikcomponents.Length)
{
IKSolver iksolver = ikcomponents[num].GetIKSolver();
IKSolver.UpdateDelegate onPreUpdate = iksolver.OnPreUpdate;
if (onPreUpdate != 0)
{
onPreUpdate();
}
if (iksolver.firstInitiation)
{
Transform root = iksolver.root;
iksolver.Initiate(root);
}
if (iksolver.<initiated>k__BackingField)
{
iksolver.OnUpdate();
IKSolver.UpdateDelegate onPostUpdate = iksolver.OnPostUpdate;
if (onPostUpdate != 0)
{
onPostUpdate();
}
}
IK[] ikcomponents2 = this.IKComponents;
num++;
}
this.fixedFrame = false;
}
}
// Token: 0x06002551 RID: 9553 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002551")]
[Address(RVA = "0x11E5A00", Offset = "0x11E4200", VA = "0x1811E5A00")]
private void FixTransforms()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002552 RID: 9554 RVA: 0x00054578 File Offset: 0x00052778
[Token(Token = "0x6002552")]
[Address(RVA = "0x33E460", Offset = "0x33CC60", VA = "0x18033E460")]
public IKExecutionOrder()
{
}
// Token: 0x04002EE1 RID: 12001
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4002EE1")]
[Tooltip("The IK components, assign in the order in which you wish to update them.")]
public IK[] IKComponents;
// Token: 0x04002EE2 RID: 12002
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x4002EE2")]
[Tooltip("Optional. Assign it if you are using 'Animate Physics' as the Update Mode.")]
public Animator animator;
// Token: 0x04002EE3 RID: 12003
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x4002EE3")]
private bool fixedFrame;
}
}