246 lines
8.0 KiB
C#
246 lines
8.0 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Cpp2IlInjected;
|
|
using UnityEngine;
|
|
|
|
namespace Obi
|
|
{
|
|
// Token: 0x02000496 RID: 1174
|
|
[Token(Token = "0x2000496")]
|
|
[ExecuteInEditMode]
|
|
[AddComponentMenu("Physics/Obi/Obi Bone")]
|
|
[RequireComponent(typeof(ObiSkinConstraints))]
|
|
[RequireComponent(typeof(ObiBendingConstraints))]
|
|
[RequireComponent(typeof(ObiDistanceConstraints))]
|
|
public class ObiBone : ObiActor
|
|
{
|
|
// Token: 0x170002AB RID: 683
|
|
// (get) Token: 0x06002985 RID: 10629 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x170002AB")]
|
|
public ObiSkinConstraints SkinConstraints
|
|
{
|
|
[Token(Token = "0x6002985")]
|
|
[Address(RVA = "0x10C7440", Offset = "0x10C5C40", VA = "0x1810C7440")]
|
|
get
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
}
|
|
|
|
// Token: 0x170002AC RID: 684
|
|
// (get) Token: 0x06002986 RID: 10630 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x170002AC")]
|
|
public ObiDistanceConstraints DistanceConstraints
|
|
{
|
|
[Token(Token = "0x6002986")]
|
|
[Address(RVA = "0x10C7390", Offset = "0x10C5B90", VA = "0x1810C7390")]
|
|
get
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
}
|
|
|
|
// Token: 0x170002AD RID: 685
|
|
// (get) Token: 0x06002987 RID: 10631 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x170002AD")]
|
|
public ObiBendingConstraints BendingConstraints
|
|
{
|
|
[Token(Token = "0x6002987")]
|
|
[Address(RVA = "0x10C72E0", Offset = "0x10C5AE0", VA = "0x1810C72E0")]
|
|
get
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
}
|
|
|
|
// Token: 0x06002988 RID: 10632 RVA: 0x0005AEA8 File Offset: 0x000590A8
|
|
[Token(Token = "0x6002988")]
|
|
[Address(RVA = "0x10C5FB0", Offset = "0x10C47B0", VA = "0x1810C5FB0", Slot = "13")]
|
|
public override void Awake()
|
|
{
|
|
base..ctor();
|
|
Animator componentInParent = base.GetComponentInParent<Animator>();
|
|
int num = 0;
|
|
if (componentInParent != num)
|
|
{
|
|
ObiAnimatorController component = componentInParent.GetComponent<ObiAnimatorController>();
|
|
this.animatorController = component;
|
|
ObiAnimatorController obiAnimatorController = this.animatorController;
|
|
int num2 = 0;
|
|
if (obiAnimatorController == num2)
|
|
{
|
|
ObiAnimatorController obiAnimatorController2 = componentInParent.gameObject.AddComponent<ObiAnimatorController>();
|
|
this.animatorController = obiAnimatorController2;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06002989 RID: 10633 RVA: 0x0005AF0C File Offset: 0x0005910C
|
|
[Token(Token = "0x6002989")]
|
|
[Address(RVA = "0x10C6AC0", Offset = "0x10C52C0", VA = "0x1810C6AC0")]
|
|
public void OnValidate()
|
|
{
|
|
float num = this.particleRadius;
|
|
float num2 = Mathf.Max((float)0, num);
|
|
this.particleRadius = num2;
|
|
}
|
|
|
|
// Token: 0x0600298A RID: 10634 RVA: 0x0005AF30 File Offset: 0x00059130
|
|
[Token(Token = "0x600298A")]
|
|
[Address(RVA = "0x10C61E0", Offset = "0x10C49E0", VA = "0x1810C61E0", Slot = "30")]
|
|
public override void OnSolverFrameEnd()
|
|
{
|
|
base..ctor();
|
|
this.UpdateBones();
|
|
}
|
|
|
|
// Token: 0x0600298B RID: 10635 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x600298B")]
|
|
[Address(RVA = "0x10C5F60", Offset = "0x10C4760", VA = "0x1810C5F60", Slot = "21")]
|
|
public override bool AddToSolver(object info)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x0600298C RID: 10636 RVA: 0x0005AF4C File Offset: 0x0005914C
|
|
[Token(Token = "0x600298C")]
|
|
[Address(RVA = "0x10C6AF0", Offset = "0x10C52F0", VA = "0x1810C6AF0", Slot = "22")]
|
|
public override bool RemoveFromSolver(object info)
|
|
{
|
|
ObiSolver solver = this.solver;
|
|
int num = 0;
|
|
if (solver != num)
|
|
{
|
|
this.solver.RelinquishRenderablePositions();
|
|
}
|
|
return base.RemoveFromSolver(info);
|
|
}
|
|
|
|
// Token: 0x0600298D RID: 10637 RVA: 0x0005AF84 File Offset: 0x00059184
|
|
[Token(Token = "0x600298D")]
|
|
[Address(RVA = "0x10C6DE0", Offset = "0x10C55E0", VA = "0x1810C6DE0")]
|
|
private void SetupAnimatorController()
|
|
{
|
|
Animator componentInParent = base.GetComponentInParent<Animator>();
|
|
int num = 0;
|
|
if (componentInParent != num)
|
|
{
|
|
ObiAnimatorController component = componentInParent.GetComponent<ObiAnimatorController>();
|
|
this.animatorController = component;
|
|
ObiAnimatorController obiAnimatorController = this.animatorController;
|
|
int num2 = 0;
|
|
if (obiAnimatorController == num2)
|
|
{
|
|
ObiAnimatorController obiAnimatorController2 = componentInParent.gameObject.AddComponent<ObiAnimatorController>();
|
|
this.animatorController = obiAnimatorController2;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600298E RID: 10638 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x600298E")]
|
|
[Address(RVA = "0x10C6100", Offset = "0x10C4900", VA = "0x1810C6100")]
|
|
private IEnumerable EnumerateBonesBreadthFirst()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x0600298F RID: 10639 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x600298F")]
|
|
[Address(RVA = "0x10C6170", Offset = "0x10C4970", VA = "0x1810C6170")]
|
|
public IEnumerator GeneratePhysicRepresentationForBones()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002990 RID: 10640 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002990")]
|
|
[Address(RVA = "0x10C6200", Offset = "0x10C4A00", VA = "0x1810C6200", Slot = "27")]
|
|
public override void OnSolverStepBegin()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002991 RID: 10641 RVA: 0x0005AFE4 File Offset: 0x000591E4
|
|
[Token(Token = "0x6002991")]
|
|
[Address(RVA = "0x10C6A30", Offset = "0x10C5230", VA = "0x1810C6A30", Slot = "28")]
|
|
public override void OnSolverStepEnd()
|
|
{
|
|
base..ctor();
|
|
ObiAnimatorController obiAnimatorController = this.animatorController;
|
|
int num = 0;
|
|
if (obiAnimatorController != num)
|
|
{
|
|
this.animatorController.updatedThisStep = false;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06002992 RID: 10642 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002992")]
|
|
[Address(RVA = "0x10C6F30", Offset = "0x10C5730", VA = "0x1810C6F30")]
|
|
public void UpdateBones()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002993 RID: 10643 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002993")]
|
|
[Address(RVA = "0x10C6B90", Offset = "0x10C5390", VA = "0x1810C6B90", Slot = "19")]
|
|
public override void ResetActor()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002994 RID: 10644 RVA: 0x0005B01C File Offset: 0x0005921C
|
|
[Token(Token = "0x6002994")]
|
|
[Address(RVA = "0x10C72C0", Offset = "0x10C5AC0", VA = "0x1810C72C0")]
|
|
public ObiBone()
|
|
{
|
|
}
|
|
|
|
// Token: 0x040032D0 RID: 13008
|
|
[Token(Token = "0x40032D0")]
|
|
public const float DEFAULT_PARTICLE_MASS = 0.1f;
|
|
|
|
// Token: 0x040032D1 RID: 13009
|
|
[Token(Token = "0x40032D1")]
|
|
public const float MAX_YOUNG_MODULUS = 20f;
|
|
|
|
// Token: 0x040032D2 RID: 13010
|
|
[Token(Token = "0x40032D2")]
|
|
public const float MIN_YOUNG_MODULUS = 0.0001f;
|
|
|
|
// Token: 0x040032D3 RID: 13011
|
|
[FieldOffset(Offset = "0xA8")]
|
|
[Token(Token = "0x40032D3")]
|
|
[Tooltip("Initial particle radius.")]
|
|
public float particleRadius = 0.05f;
|
|
|
|
// Token: 0x040032D4 RID: 13012
|
|
[FieldOffset(Offset = "0xB0")]
|
|
[Token(Token = "0x40032D4")]
|
|
[SerializeField]
|
|
[HideInInspector]
|
|
private List<Transform> bones;
|
|
|
|
// Token: 0x040032D5 RID: 13013
|
|
[FieldOffset(Offset = "0xB8")]
|
|
[Token(Token = "0x40032D5")]
|
|
[HideInInspector]
|
|
[SerializeField]
|
|
private int[] parentIndices;
|
|
|
|
// Token: 0x040032D6 RID: 13014
|
|
[FieldOffset(Offset = "0xC0")]
|
|
[Token(Token = "0x40032D6")]
|
|
[HideInInspector]
|
|
public bool[] frozen;
|
|
|
|
// Token: 0x040032D7 RID: 13015
|
|
[FieldOffset(Offset = "0xC8")]
|
|
[Token(Token = "0x40032D7")]
|
|
protected ObiAnimatorController animatorController;
|
|
}
|
|
}
|