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: 0x020004E5 RID: 1253
|
|
[Token(Token = "0x20004E5")]
|
|
[ExecuteInEditMode]
|
|
[RequireComponent(typeof(ObiDistanceConstraints))]
|
|
[RequireComponent(typeof(ObiBendingConstraints))]
|
|
[RequireComponent(typeof(ObiSkinConstraints))]
|
|
[AddComponentMenu("Physics/Obi/Obi Bone")]
|
|
public class ObiBone : ObiActor
|
|
{
|
|
// Token: 0x170002D6 RID: 726
|
|
// (get) Token: 0x06002C1C RID: 11292 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x170002D6")]
|
|
public ObiSkinConstraints SkinConstraints
|
|
{
|
|
[Token(Token = "0x6002C1C")]
|
|
[Address(RVA = "0x1093620", Offset = "0x1092620", VA = "0x181093620")]
|
|
get
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
}
|
|
|
|
// Token: 0x170002D7 RID: 727
|
|
// (get) Token: 0x06002C1D RID: 11293 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x170002D7")]
|
|
public ObiDistanceConstraints DistanceConstraints
|
|
{
|
|
[Token(Token = "0x6002C1D")]
|
|
[Address(RVA = "0x1093570", Offset = "0x1092570", VA = "0x181093570")]
|
|
get
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
}
|
|
|
|
// Token: 0x170002D8 RID: 728
|
|
// (get) Token: 0x06002C1E RID: 11294 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x170002D8")]
|
|
public ObiBendingConstraints BendingConstraints
|
|
{
|
|
[Token(Token = "0x6002C1E")]
|
|
[Address(RVA = "0x10934C0", Offset = "0x10924C0", VA = "0x1810934C0")]
|
|
get
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
}
|
|
|
|
// Token: 0x06002C1F RID: 11295 RVA: 0x00061DE8 File Offset: 0x0005FFE8
|
|
[Token(Token = "0x6002C1F")]
|
|
[Address(RVA = "0x1092190", Offset = "0x1091190", VA = "0x181092190", 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: 0x06002C20 RID: 11296 RVA: 0x00061E4C File Offset: 0x0006004C
|
|
[Token(Token = "0x6002C20")]
|
|
[Address(RVA = "0x1092CA0", Offset = "0x1091CA0", VA = "0x181092CA0")]
|
|
public void OnValidate()
|
|
{
|
|
float num = this.particleRadius;
|
|
float num2 = Mathf.Max((float)0, num);
|
|
this.particleRadius = num2;
|
|
}
|
|
|
|
// Token: 0x06002C21 RID: 11297 RVA: 0x00061E70 File Offset: 0x00060070
|
|
[Token(Token = "0x6002C21")]
|
|
[Address(RVA = "0x10923C0", Offset = "0x10913C0", VA = "0x1810923C0", Slot = "30")]
|
|
public override void OnSolverFrameEnd()
|
|
{
|
|
base..ctor();
|
|
this.UpdateBones();
|
|
}
|
|
|
|
// Token: 0x06002C22 RID: 11298 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002C22")]
|
|
[Address(RVA = "0x1092140", Offset = "0x1091140", VA = "0x181092140", Slot = "21")]
|
|
public override bool AddToSolver(object info)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002C23 RID: 11299 RVA: 0x00061E8C File Offset: 0x0006008C
|
|
[Token(Token = "0x6002C23")]
|
|
[Address(RVA = "0x1092CD0", Offset = "0x1091CD0", VA = "0x181092CD0", 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: 0x06002C24 RID: 11300 RVA: 0x00061EC4 File Offset: 0x000600C4
|
|
[Token(Token = "0x6002C24")]
|
|
[Address(RVA = "0x1092FC0", Offset = "0x1091FC0", VA = "0x181092FC0")]
|
|
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: 0x06002C25 RID: 11301 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002C25")]
|
|
[Address(RVA = "0x10922E0", Offset = "0x10912E0", VA = "0x1810922E0")]
|
|
private IEnumerable EnumerateBonesBreadthFirst()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002C26 RID: 11302 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002C26")]
|
|
[Address(RVA = "0x1092350", Offset = "0x1091350", VA = "0x181092350")]
|
|
public IEnumerator GeneratePhysicRepresentationForBones()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002C27 RID: 11303 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002C27")]
|
|
[Address(RVA = "0x10923E0", Offset = "0x10913E0", VA = "0x1810923E0", Slot = "27")]
|
|
public override void OnSolverStepBegin()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002C28 RID: 11304 RVA: 0x00061F24 File Offset: 0x00060124
|
|
[Token(Token = "0x6002C28")]
|
|
[Address(RVA = "0x1092C10", Offset = "0x1091C10", VA = "0x181092C10", Slot = "28")]
|
|
public override void OnSolverStepEnd()
|
|
{
|
|
base..ctor();
|
|
ObiAnimatorController obiAnimatorController = this.animatorController;
|
|
int num = 0;
|
|
if (obiAnimatorController != num)
|
|
{
|
|
this.animatorController.updatedThisStep = false;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06002C29 RID: 11305 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002C29")]
|
|
[Address(RVA = "0x1093110", Offset = "0x1092110", VA = "0x181093110")]
|
|
public void UpdateBones()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002C2A RID: 11306 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002C2A")]
|
|
[Address(RVA = "0x1092D70", Offset = "0x1091D70", VA = "0x181092D70", Slot = "19")]
|
|
public override void ResetActor()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002C2B RID: 11307 RVA: 0x00061F5C File Offset: 0x0006015C
|
|
[Token(Token = "0x6002C2B")]
|
|
[Address(RVA = "0x10934A0", Offset = "0x10924A0", VA = "0x1810934A0")]
|
|
public ObiBone()
|
|
{
|
|
}
|
|
|
|
// Token: 0x04003578 RID: 13688
|
|
[Token(Token = "0x4003578")]
|
|
public const float DEFAULT_PARTICLE_MASS = 0.1f;
|
|
|
|
// Token: 0x04003579 RID: 13689
|
|
[Token(Token = "0x4003579")]
|
|
public const float MAX_YOUNG_MODULUS = 20f;
|
|
|
|
// Token: 0x0400357A RID: 13690
|
|
[Token(Token = "0x400357A")]
|
|
public const float MIN_YOUNG_MODULUS = 0.0001f;
|
|
|
|
// Token: 0x0400357B RID: 13691
|
|
[FieldOffset(Offset = "0xA8")]
|
|
[Token(Token = "0x400357B")]
|
|
[Tooltip("Initial particle radius.")]
|
|
public float particleRadius = 0.05f;
|
|
|
|
// Token: 0x0400357C RID: 13692
|
|
[FieldOffset(Offset = "0xB0")]
|
|
[Token(Token = "0x400357C")]
|
|
[HideInInspector]
|
|
[SerializeField]
|
|
private List<Transform> bones;
|
|
|
|
// Token: 0x0400357D RID: 13693
|
|
[FieldOffset(Offset = "0xB8")]
|
|
[Token(Token = "0x400357D")]
|
|
[SerializeField]
|
|
[HideInInspector]
|
|
private int[] parentIndices;
|
|
|
|
// Token: 0x0400357E RID: 13694
|
|
[FieldOffset(Offset = "0xC0")]
|
|
[Token(Token = "0x400357E")]
|
|
[HideInInspector]
|
|
public bool[] frozen;
|
|
|
|
// Token: 0x0400357F RID: 13695
|
|
[FieldOffset(Offset = "0xC8")]
|
|
[Token(Token = "0x400357F")]
|
|
protected ObiAnimatorController animatorController;
|
|
}
|
|
}
|