432 lines
16 KiB
C#
432 lines
16 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.CompilerServices;
|
|
using Cpp2IlInjected;
|
|
using UnityEngine;
|
|
|
|
namespace RootMotion.FinalIK
|
|
{
|
|
// Token: 0x0200044E RID: 1102
|
|
[Token(Token = "0x200044E")]
|
|
[Serializable]
|
|
public class InteractionEffector
|
|
{
|
|
// Token: 0x17000271 RID: 625
|
|
// (get) Token: 0x060027A8 RID: 10152 RVA: 0x00057974 File Offset: 0x00055B74
|
|
// (set) Token: 0x060027A9 RID: 10153 RVA: 0x00057988 File Offset: 0x00055B88
|
|
[Token(Token = "0x17000271")]
|
|
public FullBodyBipedEffector effectorType
|
|
{
|
|
[Token(Token = "0x60027A8")]
|
|
[Address(RVA = "0x365F50", Offset = "0x364750", VA = "0x180365F50")]
|
|
get;
|
|
[Token(Token = "0x60027A9")]
|
|
[Address(RVA = "0x458E30", Offset = "0x457630", VA = "0x180458E30")]
|
|
private set;
|
|
}
|
|
|
|
// Token: 0x17000272 RID: 626
|
|
// (get) Token: 0x060027AA RID: 10154 RVA: 0x0005799C File Offset: 0x00055B9C
|
|
// (set) Token: 0x060027AB RID: 10155 RVA: 0x000579B0 File Offset: 0x00055BB0
|
|
[Token(Token = "0x17000272")]
|
|
public bool isPaused
|
|
{
|
|
[Token(Token = "0x60027AA")]
|
|
[Address(RVA = "0x434B20", Offset = "0x433320", VA = "0x180434B20")]
|
|
get;
|
|
[Token(Token = "0x60027AB")]
|
|
[Address(RVA = "0x434F40", Offset = "0x433740", VA = "0x180434F40")]
|
|
private set;
|
|
}
|
|
|
|
// Token: 0x17000273 RID: 627
|
|
// (get) Token: 0x060027AC RID: 10156 RVA: 0x000579C4 File Offset: 0x00055BC4
|
|
// (set) Token: 0x060027AD RID: 10157 RVA: 0x000579D8 File Offset: 0x00055BD8
|
|
[Token(Token = "0x17000273")]
|
|
public InteractionObject interactionObject
|
|
{
|
|
[Token(Token = "0x60027AC")]
|
|
[Address(RVA = "0x2DB450", Offset = "0x2D9C50", VA = "0x1802DB450")]
|
|
[CompilerGenerated]
|
|
get
|
|
{
|
|
return this.<interactionObject>k__BackingField;
|
|
}
|
|
[Token(Token = "0x60027AD")]
|
|
[Address(RVA = "0x454D70", Offset = "0x453570", VA = "0x180454D70")]
|
|
[CompilerGenerated]
|
|
private set
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (060027AD)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void RootMotion.FinalIK.InteractionEffector::set_interactionObject(RootMotion.FinalIK.InteractionObject)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{; Block_0:; stfld:InteractionObject(InteractionEffector::<interactionObject>k__BackingField, ldloc:InteractionEffector(this), ldloc:InteractionObject(value)); };
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1810
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 344
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1618
|
|
*/;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000274 RID: 628
|
|
// (get) Token: 0x060027AE RID: 10158 RVA: 0x000579EC File Offset: 0x00055BEC
|
|
[Token(Token = "0x17000274")]
|
|
public bool inInteraction
|
|
{
|
|
[Token(Token = "0x60027AE")]
|
|
[Address(RVA = "0x10B1830", Offset = "0x10B0030", VA = "0x1810B1830")]
|
|
get
|
|
{
|
|
InteractionObject interactionObject = this.<interactionObject>k__BackingField;
|
|
int num = 0;
|
|
return interactionObject != num;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060027AF RID: 10159 RVA: 0x00057A0C File Offset: 0x00055C0C
|
|
[Token(Token = "0x60027AF")]
|
|
[Address(RVA = "0x10B17A0", Offset = "0x10AFFA0", VA = "0x1810B17A0")]
|
|
public InteractionEffector(FullBodyBipedEffector effectorType)
|
|
{
|
|
List<bool> list = new List();
|
|
this.triggered = list;
|
|
base..ctor();
|
|
this.effectorType = effectorType;
|
|
}
|
|
|
|
// Token: 0x060027B0 RID: 10160 RVA: 0x00057A38 File Offset: 0x00055C38
|
|
[Token(Token = "0x60027B0")]
|
|
[Address(RVA = "0x10AF6D0", Offset = "0x10ADED0", VA = "0x1810AF6D0")]
|
|
public void Initiate(InteractionSystem interactionSystem)
|
|
{
|
|
this.interactionSystem = interactionSystem;
|
|
if (this.effector == (ulong)0L)
|
|
{
|
|
IKSolverFullBodyBiped solver = interactionSystem.fullBody.solver;
|
|
FullBodyBipedEffector fullBodyBipedEffector = this.<effectorType>k__BackingField;
|
|
IKEffector ikeffector = solver.GetEffector(fullBodyBipedEffector);
|
|
this.effector = ikeffector;
|
|
Poser component = this.effector.bone.GetComponent<Poser>();
|
|
this.poser = component;
|
|
}
|
|
this.StoreDefaults();
|
|
}
|
|
|
|
// Token: 0x060027B1 RID: 10161 RVA: 0x00057AA0 File Offset: 0x00055CA0
|
|
[Token(Token = "0x60027B1")]
|
|
[Address(RVA = "0x10B0A40", Offset = "0x10AF240", VA = "0x1810B0A40")]
|
|
private void StoreDefaults()
|
|
{
|
|
IKSolverFullBodyBiped solver = this.interactionSystem.fullBody.solver;
|
|
FullBodyBipedEffector fullBodyBipedEffector = this.<effectorType>k__BackingField;
|
|
float positionWeight = solver.GetEffector(fullBodyBipedEffector).positionWeight;
|
|
this.defaultPositionWeight = positionWeight;
|
|
IKSolverFullBodyBiped solver2 = this.interactionSystem.fullBody.solver;
|
|
FullBodyBipedEffector fullBodyBipedEffector2 = this.<effectorType>k__BackingField;
|
|
float rotationWeight = solver2.GetEffector(fullBodyBipedEffector2).rotationWeight;
|
|
this.defaultRotationWeight = rotationWeight;
|
|
IKSolverFullBodyBiped solver3 = this.interactionSystem.fullBody.solver;
|
|
FullBodyBipedEffector fullBodyBipedEffector3 = this.<effectorType>k__BackingField;
|
|
float pull = solver3.GetChain(fullBodyBipedEffector3).pull;
|
|
this.defaultPull = pull;
|
|
IKSolverFullBodyBiped solver4 = this.interactionSystem.fullBody.solver;
|
|
FullBodyBipedEffector fullBodyBipedEffector4 = this.<effectorType>k__BackingField;
|
|
float reach = solver4.GetChain(fullBodyBipedEffector4).reach;
|
|
this.defaultReach = reach;
|
|
IKSolverFullBodyBiped solver5 = this.interactionSystem.fullBody.solver;
|
|
FullBodyBipedEffector fullBodyBipedEffector5 = this.<effectorType>k__BackingField;
|
|
float push = solver5.GetChain(fullBodyBipedEffector5).push;
|
|
this.defaultPush = push;
|
|
IKSolverFullBodyBiped solver6 = this.interactionSystem.fullBody.solver;
|
|
FullBodyBipedEffector fullBodyBipedEffector6 = this.<effectorType>k__BackingField;
|
|
float pushParent = solver6.GetChain(fullBodyBipedEffector6).pushParent;
|
|
this.defaultPushParent = pushParent;
|
|
}
|
|
|
|
// Token: 0x060027B2 RID: 10162 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60027B2")]
|
|
[Address(RVA = "0x10AFDF0", Offset = "0x10AE5F0", VA = "0x1810AFDF0")]
|
|
public bool ResetToDefaults(float speed)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060027B3 RID: 10163 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60027B3")]
|
|
[Address(RVA = "0x10AFA30", Offset = "0x10AE230", VA = "0x1810AFA30")]
|
|
public bool Pause()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060027B4 RID: 10164 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60027B4")]
|
|
[Address(RVA = "0x10B0220", Offset = "0x10AEA20", VA = "0x1810B0220")]
|
|
public bool Resume()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060027B5 RID: 10165 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60027B5")]
|
|
[Address(RVA = "0x10B02D0", Offset = "0x10AEAD0", VA = "0x1810B02D0")]
|
|
public bool Start(InteractionObject interactionObject, string tag, float fadeInTime, bool interrupt)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060027B6 RID: 10166 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60027B6")]
|
|
[Address(RVA = "0x10B0EC0", Offset = "0x10AF6C0", VA = "0x1810B0EC0")]
|
|
public void Update(Transform root, float speed)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x17000275 RID: 629
|
|
// (get) Token: 0x060027B7 RID: 10167 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x17000275")]
|
|
public float progress
|
|
{
|
|
[Token(Token = "0x60027B7")]
|
|
[Address(RVA = "0x10B1890", Offset = "0x10B0090", VA = "0x1810B1890")]
|
|
get
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
}
|
|
|
|
// Token: 0x060027B8 RID: 10168 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60027B8")]
|
|
[Address(RVA = "0x10B0BE0", Offset = "0x10AF3E0", VA = "0x1810B0BE0")]
|
|
private void TriggerUntriggeredEvents(bool checkTime, out bool pickUp, out bool pause)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060027B9 RID: 10169 RVA: 0x00057BD8 File Offset: 0x00055DD8
|
|
[Token(Token = "0x60027B9")]
|
|
[Address(RVA = "0x10AFBA0", Offset = "0x10AE3A0", VA = "0x1810AFBA0")]
|
|
private void PickUp(Transform root)
|
|
{
|
|
IKEffector ikeffector = this.effector;
|
|
float z = ikeffector.position.z;
|
|
this.pickUpPosition.z = z;
|
|
Quaternion rotation = ikeffector.rotation;
|
|
InteractionObject interactionObject = this.<interactionObject>k__BackingField;
|
|
this.pickUpRotation = rotation;
|
|
Rigidbody component = interactionObject.targetsRoot.GetComponent<Rigidbody>();
|
|
int num = 0;
|
|
if (component != num)
|
|
{
|
|
if (!component.isKinematic)
|
|
{
|
|
component.isKinematic = true;
|
|
}
|
|
Collider component2 = root.GetComponent<Collider>();
|
|
int num2 = 0;
|
|
if (component2 != num2)
|
|
{
|
|
Collider[] componentsInChildren = this.<interactionObject>k__BackingField.targetsRoot.GetComponentsInChildren<Collider>();
|
|
int num3 = 0;
|
|
int num4 = componentsInChildren.Length;
|
|
if (num3 < num4)
|
|
{
|
|
Collider collider = componentsInChildren[num3];
|
|
if (!collider.isTrigger)
|
|
{
|
|
Physics.IgnoreCollision(root.GetComponent<Collider>(), collider);
|
|
}
|
|
num3++;
|
|
}
|
|
}
|
|
}
|
|
InteractionSystem.InteractionDelegate onInteractionPickUp = this.interactionSystem.OnInteractionPickUp;
|
|
if (onInteractionPickUp != 0)
|
|
{
|
|
InteractionObject interactionObject2 = this.<interactionObject>k__BackingField;
|
|
FullBodyBipedEffector fullBodyBipedEffector = this.<effectorType>k__BackingField;
|
|
onInteractionPickUp(fullBodyBipedEffector, interactionObject2);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060027BA RID: 10170 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60027BA")]
|
|
[Address(RVA = "0x10B0800", Offset = "0x10AF000", VA = "0x1810B0800")]
|
|
public bool Stop()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060027BB RID: 10171 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60027BB")]
|
|
[Address(RVA = "0x10AF7A0", Offset = "0x10ADFA0", VA = "0x1810AF7A0")]
|
|
public void OnPostFBBIK()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x04003135 RID: 12597
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4003135")]
|
|
private Poser poser;
|
|
|
|
// Token: 0x04003136 RID: 12598
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4003136")]
|
|
private IKEffector effector;
|
|
|
|
// Token: 0x04003137 RID: 12599
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x4003137")]
|
|
private float timer;
|
|
|
|
// Token: 0x04003138 RID: 12600
|
|
[FieldOffset(Offset = "0x34")]
|
|
[Token(Token = "0x4003138")]
|
|
private float length;
|
|
|
|
// Token: 0x04003139 RID: 12601
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x4003139")]
|
|
private float weight;
|
|
|
|
// Token: 0x0400313A RID: 12602
|
|
[FieldOffset(Offset = "0x3C")]
|
|
[Token(Token = "0x400313A")]
|
|
private float fadeInSpeed;
|
|
|
|
// Token: 0x0400313B RID: 12603
|
|
[FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x400313B")]
|
|
private float defaultPositionWeight;
|
|
|
|
// Token: 0x0400313C RID: 12604
|
|
[FieldOffset(Offset = "0x44")]
|
|
[Token(Token = "0x400313C")]
|
|
private float defaultRotationWeight;
|
|
|
|
// Token: 0x0400313D RID: 12605
|
|
[FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x400313D")]
|
|
private float defaultPull;
|
|
|
|
// Token: 0x0400313E RID: 12606
|
|
[FieldOffset(Offset = "0x4C")]
|
|
[Token(Token = "0x400313E")]
|
|
private float defaultReach;
|
|
|
|
// Token: 0x0400313F RID: 12607
|
|
[FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x400313F")]
|
|
private float defaultPush;
|
|
|
|
// Token: 0x04003140 RID: 12608
|
|
[FieldOffset(Offset = "0x54")]
|
|
[Token(Token = "0x4003140")]
|
|
private float defaultPushParent;
|
|
|
|
// Token: 0x04003141 RID: 12609
|
|
[FieldOffset(Offset = "0x58")]
|
|
[Token(Token = "0x4003141")]
|
|
private float resetTimer;
|
|
|
|
// Token: 0x04003142 RID: 12610
|
|
[FieldOffset(Offset = "0x5C")]
|
|
[Token(Token = "0x4003142")]
|
|
private bool positionWeightUsed;
|
|
|
|
// Token: 0x04003143 RID: 12611
|
|
[FieldOffset(Offset = "0x5D")]
|
|
[Token(Token = "0x4003143")]
|
|
private bool rotationWeightUsed;
|
|
|
|
// Token: 0x04003144 RID: 12612
|
|
[FieldOffset(Offset = "0x5E")]
|
|
[Token(Token = "0x4003144")]
|
|
private bool pullUsed;
|
|
|
|
// Token: 0x04003145 RID: 12613
|
|
[FieldOffset(Offset = "0x5F")]
|
|
[Token(Token = "0x4003145")]
|
|
private bool reachUsed;
|
|
|
|
// Token: 0x04003146 RID: 12614
|
|
[FieldOffset(Offset = "0x60")]
|
|
[Token(Token = "0x4003146")]
|
|
private bool pushUsed;
|
|
|
|
// Token: 0x04003147 RID: 12615
|
|
[FieldOffset(Offset = "0x61")]
|
|
[Token(Token = "0x4003147")]
|
|
private bool pushParentUsed;
|
|
|
|
// Token: 0x04003148 RID: 12616
|
|
[FieldOffset(Offset = "0x62")]
|
|
[Token(Token = "0x4003148")]
|
|
private bool pickedUp;
|
|
|
|
// Token: 0x04003149 RID: 12617
|
|
[FieldOffset(Offset = "0x63")]
|
|
[Token(Token = "0x4003149")]
|
|
private bool defaults;
|
|
|
|
// Token: 0x0400314A RID: 12618
|
|
[FieldOffset(Offset = "0x64")]
|
|
[Token(Token = "0x400314A")]
|
|
private bool pickUpOnPostFBBIK;
|
|
|
|
// Token: 0x0400314B RID: 12619
|
|
[FieldOffset(Offset = "0x68")]
|
|
[Token(Token = "0x400314B")]
|
|
private Vector3 pickUpPosition;
|
|
|
|
// Token: 0x0400314C RID: 12620
|
|
[FieldOffset(Offset = "0x74")]
|
|
[Token(Token = "0x400314C")]
|
|
private Vector3 pausePositionRelative;
|
|
|
|
// Token: 0x0400314D RID: 12621
|
|
[FieldOffset(Offset = "0x80")]
|
|
[Token(Token = "0x400314D")]
|
|
private Quaternion pickUpRotation;
|
|
|
|
// Token: 0x0400314E RID: 12622
|
|
[FieldOffset(Offset = "0x90")]
|
|
[Token(Token = "0x400314E")]
|
|
private Quaternion pauseRotationRelative;
|
|
|
|
// Token: 0x0400314F RID: 12623
|
|
[FieldOffset(Offset = "0xA0")]
|
|
[Token(Token = "0x400314F")]
|
|
private InteractionTarget interactionTarget;
|
|
|
|
// Token: 0x04003150 RID: 12624
|
|
[FieldOffset(Offset = "0xA8")]
|
|
[Token(Token = "0x4003150")]
|
|
private Transform target;
|
|
|
|
// Token: 0x04003151 RID: 12625
|
|
[FieldOffset(Offset = "0xB0")]
|
|
[Token(Token = "0x4003151")]
|
|
private List<bool> triggered;
|
|
|
|
// Token: 0x04003152 RID: 12626
|
|
[FieldOffset(Offset = "0xB8")]
|
|
[Token(Token = "0x4003152")]
|
|
private InteractionSystem interactionSystem;
|
|
|
|
// Token: 0x04003153 RID: 12627
|
|
[FieldOffset(Offset = "0xC0")]
|
|
[Token(Token = "0x4003153")]
|
|
private bool started;
|
|
}
|
|
}
|