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: 0x02000445 RID: 1093
|
|
[Token(Token = "0x2000445")]
|
|
[Serializable]
|
|
public class InteractionEffector
|
|
{
|
|
// Token: 0x17000277 RID: 631
|
|
// (get) Token: 0x06002776 RID: 10102 RVA: 0x00057344 File Offset: 0x00055544
|
|
// (set) Token: 0x06002777 RID: 10103 RVA: 0x00057358 File Offset: 0x00055558
|
|
[Token(Token = "0x17000277")]
|
|
public FullBodyBipedEffector effectorType
|
|
{
|
|
[Token(Token = "0x6002776")]
|
|
[Address(RVA = "0x2B3F20", Offset = "0x2B2D20", VA = "0x1802B3F20")]
|
|
get;
|
|
[Token(Token = "0x6002777")]
|
|
[Address(RVA = "0x417DE0", Offset = "0x416BE0", VA = "0x180417DE0")]
|
|
private set;
|
|
}
|
|
|
|
// Token: 0x17000278 RID: 632
|
|
// (get) Token: 0x06002778 RID: 10104 RVA: 0x0005736C File Offset: 0x0005556C
|
|
// (set) Token: 0x06002779 RID: 10105 RVA: 0x00057380 File Offset: 0x00055580
|
|
[Token(Token = "0x17000278")]
|
|
public bool isPaused
|
|
{
|
|
[Token(Token = "0x6002778")]
|
|
[Address(RVA = "0x412250", Offset = "0x411050", VA = "0x180412250")]
|
|
get;
|
|
[Token(Token = "0x6002779")]
|
|
[Address(RVA = "0x412670", Offset = "0x411470", VA = "0x180412670")]
|
|
private set;
|
|
}
|
|
|
|
// Token: 0x17000279 RID: 633
|
|
// (get) Token: 0x0600277A RID: 10106 RVA: 0x00057394 File Offset: 0x00055594
|
|
// (set) Token: 0x0600277B RID: 10107 RVA: 0x000573A8 File Offset: 0x000555A8
|
|
[Token(Token = "0x17000279")]
|
|
public InteractionObject interactionObject
|
|
{
|
|
[Token(Token = "0x600277A")]
|
|
[Address(RVA = "0x2B4380", Offset = "0x2B3180", VA = "0x1802B4380")]
|
|
[CompilerGenerated]
|
|
get
|
|
{
|
|
return this.<interactionObject>k__BackingField;
|
|
}
|
|
[Token(Token = "0x600277B")]
|
|
[Address(RVA = "0x413D20", Offset = "0x412B20", VA = "0x180413D20")]
|
|
[CompilerGenerated]
|
|
private set
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600277B)
|
|
|
|
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: 0x1700027A RID: 634
|
|
// (get) Token: 0x0600277C RID: 10108 RVA: 0x000573BC File Offset: 0x000555BC
|
|
[Token(Token = "0x1700027A")]
|
|
public bool inInteraction
|
|
{
|
|
[Token(Token = "0x600277C")]
|
|
[Address(RVA = "0x10D59F0", Offset = "0x10D47F0", VA = "0x1810D59F0")]
|
|
get
|
|
{
|
|
InteractionObject interactionObject = this.<interactionObject>k__BackingField;
|
|
int num = 0;
|
|
return interactionObject != num;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600277D RID: 10109 RVA: 0x000573DC File Offset: 0x000555DC
|
|
[Token(Token = "0x600277D")]
|
|
[Address(RVA = "0x10D5960", Offset = "0x10D4760", VA = "0x1810D5960")]
|
|
public InteractionEffector(FullBodyBipedEffector effectorType)
|
|
{
|
|
List<bool> list = new List();
|
|
this.triggered = list;
|
|
base..ctor();
|
|
this.effectorType = effectorType;
|
|
}
|
|
|
|
// Token: 0x0600277E RID: 10110 RVA: 0x00057408 File Offset: 0x00055608
|
|
[Token(Token = "0x600277E")]
|
|
[Address(RVA = "0x10D3890", Offset = "0x10D2690", VA = "0x1810D3890")]
|
|
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: 0x0600277F RID: 10111 RVA: 0x00057470 File Offset: 0x00055670
|
|
[Token(Token = "0x600277F")]
|
|
[Address(RVA = "0x10D4C00", Offset = "0x10D3A00", VA = "0x1810D4C00")]
|
|
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: 0x06002780 RID: 10112 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002780")]
|
|
[Address(RVA = "0x10D3FB0", Offset = "0x10D2DB0", VA = "0x1810D3FB0")]
|
|
public bool ResetToDefaults(float speed)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002781 RID: 10113 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002781")]
|
|
[Address(RVA = "0x10D3BF0", Offset = "0x10D29F0", VA = "0x1810D3BF0")]
|
|
public bool Pause()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002782 RID: 10114 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002782")]
|
|
[Address(RVA = "0x10D43E0", Offset = "0x10D31E0", VA = "0x1810D43E0")]
|
|
public bool Resume()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002783 RID: 10115 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002783")]
|
|
[Address(RVA = "0x10D4490", Offset = "0x10D3290", VA = "0x1810D4490")]
|
|
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: 0x06002784 RID: 10116 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002784")]
|
|
[Address(RVA = "0x10D5080", Offset = "0x10D3E80", VA = "0x1810D5080")]
|
|
public void Update(Transform root, float speed)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x1700027B RID: 635
|
|
// (get) Token: 0x06002785 RID: 10117 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x1700027B")]
|
|
public float progress
|
|
{
|
|
[Token(Token = "0x6002785")]
|
|
[Address(RVA = "0x10D5A50", Offset = "0x10D4850", VA = "0x1810D5A50")]
|
|
get
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
}
|
|
|
|
// Token: 0x06002786 RID: 10118 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002786")]
|
|
[Address(RVA = "0x10D4DA0", Offset = "0x10D3BA0", VA = "0x1810D4DA0")]
|
|
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: 0x06002787 RID: 10119 RVA: 0x000575A8 File Offset: 0x000557A8
|
|
[Token(Token = "0x6002787")]
|
|
[Address(RVA = "0x10D3D60", Offset = "0x10D2B60", VA = "0x1810D3D60")]
|
|
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: 0x06002788 RID: 10120 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002788")]
|
|
[Address(RVA = "0x10D49C0", Offset = "0x10D37C0", VA = "0x1810D49C0")]
|
|
public bool Stop()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002789 RID: 10121 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002789")]
|
|
[Address(RVA = "0x10D3960", Offset = "0x10D2760", VA = "0x1810D3960")]
|
|
public void OnPostFBBIK()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x040030F3 RID: 12531
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x40030F3")]
|
|
private Poser poser;
|
|
|
|
// Token: 0x040030F4 RID: 12532
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x40030F4")]
|
|
private IKEffector effector;
|
|
|
|
// Token: 0x040030F5 RID: 12533
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x40030F5")]
|
|
private float timer;
|
|
|
|
// Token: 0x040030F6 RID: 12534
|
|
[FieldOffset(Offset = "0x34")]
|
|
[Token(Token = "0x40030F6")]
|
|
private float length;
|
|
|
|
// Token: 0x040030F7 RID: 12535
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x40030F7")]
|
|
private float weight;
|
|
|
|
// Token: 0x040030F8 RID: 12536
|
|
[FieldOffset(Offset = "0x3C")]
|
|
[Token(Token = "0x40030F8")]
|
|
private float fadeInSpeed;
|
|
|
|
// Token: 0x040030F9 RID: 12537
|
|
[FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x40030F9")]
|
|
private float defaultPositionWeight;
|
|
|
|
// Token: 0x040030FA RID: 12538
|
|
[FieldOffset(Offset = "0x44")]
|
|
[Token(Token = "0x40030FA")]
|
|
private float defaultRotationWeight;
|
|
|
|
// Token: 0x040030FB RID: 12539
|
|
[FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x40030FB")]
|
|
private float defaultPull;
|
|
|
|
// Token: 0x040030FC RID: 12540
|
|
[FieldOffset(Offset = "0x4C")]
|
|
[Token(Token = "0x40030FC")]
|
|
private float defaultReach;
|
|
|
|
// Token: 0x040030FD RID: 12541
|
|
[FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x40030FD")]
|
|
private float defaultPush;
|
|
|
|
// Token: 0x040030FE RID: 12542
|
|
[FieldOffset(Offset = "0x54")]
|
|
[Token(Token = "0x40030FE")]
|
|
private float defaultPushParent;
|
|
|
|
// Token: 0x040030FF RID: 12543
|
|
[FieldOffset(Offset = "0x58")]
|
|
[Token(Token = "0x40030FF")]
|
|
private float resetTimer;
|
|
|
|
// Token: 0x04003100 RID: 12544
|
|
[FieldOffset(Offset = "0x5C")]
|
|
[Token(Token = "0x4003100")]
|
|
private bool positionWeightUsed;
|
|
|
|
// Token: 0x04003101 RID: 12545
|
|
[FieldOffset(Offset = "0x5D")]
|
|
[Token(Token = "0x4003101")]
|
|
private bool rotationWeightUsed;
|
|
|
|
// Token: 0x04003102 RID: 12546
|
|
[FieldOffset(Offset = "0x5E")]
|
|
[Token(Token = "0x4003102")]
|
|
private bool pullUsed;
|
|
|
|
// Token: 0x04003103 RID: 12547
|
|
[FieldOffset(Offset = "0x5F")]
|
|
[Token(Token = "0x4003103")]
|
|
private bool reachUsed;
|
|
|
|
// Token: 0x04003104 RID: 12548
|
|
[FieldOffset(Offset = "0x60")]
|
|
[Token(Token = "0x4003104")]
|
|
private bool pushUsed;
|
|
|
|
// Token: 0x04003105 RID: 12549
|
|
[FieldOffset(Offset = "0x61")]
|
|
[Token(Token = "0x4003105")]
|
|
private bool pushParentUsed;
|
|
|
|
// Token: 0x04003106 RID: 12550
|
|
[FieldOffset(Offset = "0x62")]
|
|
[Token(Token = "0x4003106")]
|
|
private bool pickedUp;
|
|
|
|
// Token: 0x04003107 RID: 12551
|
|
[FieldOffset(Offset = "0x63")]
|
|
[Token(Token = "0x4003107")]
|
|
private bool defaults;
|
|
|
|
// Token: 0x04003108 RID: 12552
|
|
[FieldOffset(Offset = "0x64")]
|
|
[Token(Token = "0x4003108")]
|
|
private bool pickUpOnPostFBBIK;
|
|
|
|
// Token: 0x04003109 RID: 12553
|
|
[FieldOffset(Offset = "0x68")]
|
|
[Token(Token = "0x4003109")]
|
|
private Vector3 pickUpPosition;
|
|
|
|
// Token: 0x0400310A RID: 12554
|
|
[FieldOffset(Offset = "0x74")]
|
|
[Token(Token = "0x400310A")]
|
|
private Vector3 pausePositionRelative;
|
|
|
|
// Token: 0x0400310B RID: 12555
|
|
[FieldOffset(Offset = "0x80")]
|
|
[Token(Token = "0x400310B")]
|
|
private Quaternion pickUpRotation;
|
|
|
|
// Token: 0x0400310C RID: 12556
|
|
[FieldOffset(Offset = "0x90")]
|
|
[Token(Token = "0x400310C")]
|
|
private Quaternion pauseRotationRelative;
|
|
|
|
// Token: 0x0400310D RID: 12557
|
|
[FieldOffset(Offset = "0xA0")]
|
|
[Token(Token = "0x400310D")]
|
|
private InteractionTarget interactionTarget;
|
|
|
|
// Token: 0x0400310E RID: 12558
|
|
[FieldOffset(Offset = "0xA8")]
|
|
[Token(Token = "0x400310E")]
|
|
private Transform target;
|
|
|
|
// Token: 0x0400310F RID: 12559
|
|
[FieldOffset(Offset = "0xB0")]
|
|
[Token(Token = "0x400310F")]
|
|
private List<bool> triggered;
|
|
|
|
// Token: 0x04003110 RID: 12560
|
|
[FieldOffset(Offset = "0xB8")]
|
|
[Token(Token = "0x4003110")]
|
|
private InteractionSystem interactionSystem;
|
|
|
|
// Token: 0x04003111 RID: 12561
|
|
[FieldOffset(Offset = "0xC0")]
|
|
[Token(Token = "0x4003111")]
|
|
private bool started;
|
|
}
|
|
}
|