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

154 lines
4.6 KiB
C#

using System;
using Cpp2IlInjected;
using RootMotion.FinalIK;
using UnityEngine;
namespace RootMotion.Demos
{
// Token: 0x020003C1 RID: 961
[Token(Token = "0x20003C1")]
public class FBBIKSettings : MonoBehaviour
{
// Token: 0x0600236F RID: 9071 RVA: 0x00051230 File Offset: 0x0004F430
[Token(Token = "0x600236F")]
[Address(RVA = "0x4C5A80", Offset = "0x4C4280", VA = "0x1804C5A80")]
public void UpdateSettings()
{
FullBodyBipedIK fullBodyBipedIK = this.ik;
int num = 0;
if (!(fullBodyBipedIK == num))
{
FullBodyBipedIK fullBodyBipedIK2 = this.ik;
FBBIKSettings.Limb limb = this.leftArm;
IKSolverFullBodyBiped solver = fullBodyBipedIK2.solver;
int num2 = 0;
limb.Apply((FullBodyBipedChain)num2, solver);
FullBodyBipedIK fullBodyBipedIK3 = this.ik;
FBBIKSettings.Limb limb2 = this.rightArm;
IKSolverFullBodyBiped solver2 = fullBodyBipedIK3.solver;
limb2.Apply(FullBodyBipedChain.RightArm, solver2);
FullBodyBipedIK fullBodyBipedIK4 = this.ik;
FBBIKSettings.Limb limb3 = this.leftLeg;
IKSolverFullBodyBiped solver3 = fullBodyBipedIK4.solver;
limb3.Apply(FullBodyBipedChain.LeftLeg, solver3);
FullBodyBipedIK fullBodyBipedIK5 = this.ik;
FBBIKSettings.Limb limb4 = this.rightLeg;
IKSolverFullBodyBiped solver4 = fullBodyBipedIK5.solver;
limb4.Apply(FullBodyBipedChain.RightLeg, solver4);
FBIKChain fbikchain = this.ik.solver.chain[0];
float num3 = this.rootPin;
fbikchain.pin = num3;
IKEffector bodyEffector = this.ik.solver.bodyEffector;
bool flag = this.bodyEffectChildNodes;
bodyEffector.effectChildNodes = flag;
}
}
// Token: 0x06002370 RID: 9072 RVA: 0x00051334 File Offset: 0x0004F534
[Token(Token = "0x6002370")]
[Address(RVA = "0x4C59F0", Offset = "0x4C41F0", VA = "0x1804C59F0")]
private void Start()
{
Debug.Log("FBBIKSettings is deprecated, you can now edit all the settings from the custom inspector of the FullBodyBipedIK component.");
this.UpdateSettings();
if (this.disableAfterStart)
{
int num = 0;
base.enabled = num != 0;
return;
}
}
// Token: 0x06002371 RID: 9073 RVA: 0x00051364 File Offset: 0x0004F564
[Token(Token = "0x6002371")]
[Address(RVA = "0x4C5C00", Offset = "0x4C4400", VA = "0x1804C5C00")]
private void Update()
{
this.UpdateSettings();
}
// Token: 0x06002372 RID: 9074 RVA: 0x00051378 File Offset: 0x0004F578
[Token(Token = "0x6002372")]
[Address(RVA = "0x4C5C10", Offset = "0x4C4410", VA = "0x1804C5C10")]
public FBBIKSettings()
{
}
// Token: 0x04002CE0 RID: 11488
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4002CE0")]
public FullBodyBipedIK ik;
// Token: 0x04002CE1 RID: 11489
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x4002CE1")]
public bool disableAfterStart;
// Token: 0x04002CE2 RID: 11490
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x4002CE2")]
public FBBIKSettings.Limb leftArm;
// Token: 0x04002CE3 RID: 11491
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x4002CE3")]
public FBBIKSettings.Limb rightArm;
// Token: 0x04002CE4 RID: 11492
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x4002CE4")]
public FBBIKSettings.Limb leftLeg;
// Token: 0x04002CE5 RID: 11493
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x4002CE5")]
public FBBIKSettings.Limb rightLeg;
// Token: 0x04002CE6 RID: 11494
[FieldOffset(Offset = "0x48")]
[Token(Token = "0x4002CE6")]
public float rootPin;
// Token: 0x04002CE7 RID: 11495
[FieldOffset(Offset = "0x4C")]
[Token(Token = "0x4002CE7")]
public bool bodyEffectChildNodes = true;
// Token: 0x020003C2 RID: 962
[Token(Token = "0x20003C2")]
[Serializable]
public class Limb
{
// Token: 0x06002373 RID: 9075 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002373")]
[Address(RVA = "0x66FAA0", Offset = "0x66E2A0", VA = "0x18066FAA0")]
public void Apply(FullBodyBipedChain chain, IKSolverFullBodyBiped solver)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002374 RID: 9076 RVA: 0x00051394 File Offset: 0x0004F594
[Token(Token = "0x6002374")]
[Address(RVA = "0x66FB20", Offset = "0x66E320", VA = "0x18066FB20")]
public Limb()
{
}
// Token: 0x04002CE8 RID: 11496
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4002CE8")]
public FBIKChain.Smoothing reachSmoothing;
// Token: 0x04002CE9 RID: 11497
[FieldOffset(Offset = "0x14")]
[Token(Token = "0x4002CE9")]
public float maintainRelativePositionWeight;
// Token: 0x04002CEA RID: 11498
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4002CEA")]
public float mappingWeight = 1f;
}
}
}