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

491 lines
16 KiB
C#

using System;
using System.Runtime.CompilerServices;
using Cpp2IlInjected;
using UnityEngine;
namespace RootMotion.FinalIK
{
// Token: 0x0200047C RID: 1148
[Token(Token = "0x200047C")]
public class HitReactionVRIK : OffsetModifierVRIK
{
// Token: 0x060028EA RID: 10474 RVA: 0x00059E30 File Offset: 0x00058030
[Token(Token = "0x60028EA")]
[Address(RVA = "0x11E14D0", Offset = "0x11DFCD0", VA = "0x1811E14D0", Slot = "4")]
protected override void OnModifyOffset()
{
HitReactionVRIK.PositionOffset[] array = this.positionOffsets;
int num = 0;
int length = array.Length;
if (num < length)
{
HitReactionVRIK.PositionOffset positionOffset = array[num];
float weight = this.weight;
AnimationCurve[] array2 = this.offsetCurves;
VRIK ik = this.ik;
positionOffset.Apply(ik, array2, weight);
num++;
}
HitReactionVRIK.RotationOffset[] array3 = this.rotationOffsets;
int length2 = array3.Length;
if (num < length2)
{
HitReactionVRIK.RotationOffset rotationOffset = array3[num];
float weight2 = this.weight;
AnimationCurve[] array4 = this.offsetCurves;
VRIK ik2 = this.ik;
rotationOffset.Apply(ik2, array4, weight2);
num++;
}
}
// Token: 0x060028EB RID: 10475 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x60028EB")]
[Address(RVA = "0x11E1230", Offset = "0x11DFA30", VA = "0x1811E1230")]
public void Hit(Collider collider, Vector3 force, Vector3 point)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x060028EC RID: 10476 RVA: 0x00059ED0 File Offset: 0x000580D0
[Token(Token = "0x60028EC")]
[Address(RVA = "0xA91CB0", Offset = "0xA904B0", VA = "0x180A91CB0")]
public HitReactionVRIK()
{
}
// Token: 0x0400323B RID: 12859
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x400323B")]
public AnimationCurve[] offsetCurves;
// Token: 0x0400323C RID: 12860
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x400323C")]
[Tooltip("Hit points for the FBBIK effectors")]
public HitReactionVRIK.PositionOffset[] positionOffsets;
// Token: 0x0400323D RID: 12861
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x400323D")]
[Tooltip(" Hit points for bones without an effector, such as the head")]
public HitReactionVRIK.RotationOffset[] rotationOffsets;
// Token: 0x0200047D RID: 1149
[Token(Token = "0x200047D")]
[Serializable]
public abstract class Offset
{
// Token: 0x17000290 RID: 656
// (get) Token: 0x060028ED RID: 10477 RVA: 0x00059EE4 File Offset: 0x000580E4
// (set) Token: 0x060028EE RID: 10478 RVA: 0x00059EF8 File Offset: 0x000580F8
[Token(Token = "0x17000290")]
private protected float crossFader
{
[Token(Token = "0x60028ED")]
[Address(RVA = "0x5ACB40", Offset = "0x5AB340", VA = "0x1805ACB40")]
protected get;
[Token(Token = "0x60028EE")]
[Address(RVA = "0x5ACBD0", Offset = "0x5AB3D0", VA = "0x1805ACBD0")]
private set;
}
// Token: 0x17000291 RID: 657
// (get) Token: 0x060028EF RID: 10479 RVA: 0x00059F0C File Offset: 0x0005810C
// (set) Token: 0x060028F0 RID: 10480 RVA: 0x00059F20 File Offset: 0x00058120
[Token(Token = "0x17000291")]
private protected float timer
{
[Token(Token = "0x60028EF")]
[Address(RVA = "0x66CA40", Offset = "0x66B240", VA = "0x18066CA40")]
protected get;
[Token(Token = "0x60028F0")]
[Address(RVA = "0x66CA50", Offset = "0x66B250", VA = "0x18066CA50")]
private set;
}
// Token: 0x17000292 RID: 658
// (get) Token: 0x060028F1 RID: 10481 RVA: 0x000020D3 File Offset: 0x000002D3
// (set) Token: 0x060028F2 RID: 10482 RVA: 0x00059F34 File Offset: 0x00058134
[Token(Token = "0x17000292")]
private protected Vector3 force
{
[Token(Token = "0x60028F1")]
[Address(RVA = "0x13017D0", Offset = "0x12FFFD0", VA = "0x1813017D0")]
[CompilerGenerated]
protected get
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
[Token(Token = "0x60028F2")]
[Address(RVA = "0x13018C0", Offset = "0x13000C0", VA = "0x1813018C0")]
[CompilerGenerated]
private set
{
float z = value.z;
this.<force>k__BackingField.z = z;
}
}
// Token: 0x17000293 RID: 659
// (get) Token: 0x060028F3 RID: 10483 RVA: 0x000020D3 File Offset: 0x000002D3
// (set) Token: 0x060028F4 RID: 10484 RVA: 0x00059F54 File Offset: 0x00058154
[Token(Token = "0x17000293")]
private protected Vector3 point
{
[Token(Token = "0x60028F3")]
[Address(RVA = "0x3D4860", Offset = "0x3D3060", VA = "0x1803D4860")]
[CompilerGenerated]
protected get
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
[Token(Token = "0x60028F4")]
[Address(RVA = "0x3D48E0", Offset = "0x3D30E0", VA = "0x1803D48E0")]
[CompilerGenerated]
private set
{
float z = value.z;
this.<point>k__BackingField.z = z;
}
}
// Token: 0x060028F5 RID: 10485 RVA: 0x00059F74 File Offset: 0x00058174
[Token(Token = "0x60028F5")]
[Address(RVA = "0x158B890", Offset = "0x158A090", VA = "0x18158B890")]
public void Hit(Vector3 force, AnimationCurve[] curves, Vector3 point)
{
int num = 0;
float num2 = this.GetLength(curves);
this.length = num2;
if (num < (int)num2)
{
int num3 = 0;
this.<crossFader>k__BackingField = (float)num3;
if (this.crossFadeTime > (float)num)
{
}
int num4 = 0;
this.crossFadeSpeed = (float)num4;
this.CrossFadeStart();
float z = force.z;
this.<force>k__BackingField.z = z;
float z2 = point.z;
this.<point>k__BackingField.z = z2;
this.<timer>k__BackingField = (float)num3;
}
Debug.LogError("Hit Point WeightCurve length is zero.");
}
// Token: 0x060028F6 RID: 10486 RVA: 0x00059FF4 File Offset: 0x000581F4
[Token(Token = "0x60028F6")]
[Address(RVA = "0x158B7A0", Offset = "0x1589FA0", VA = "0x18158B7A0")]
public void Apply(VRIK ik, AnimationCurve[] curves, float weight)
{
float time = Time.time;
float time2 = Time.time;
float num = this.length;
this.lastTime = time2;
float num2 = this.<timer>k__BackingField;
if (num2 < num)
{
int num3 = 0;
int num4 = 0;
float num5 = Mathf.Clamp(num2, (float)num3, num);
this.<timer>k__BackingField = num5;
float num6 = this.crossFadeSpeed;
if (num6 <= (float)num4)
{
}
int num7 = 0;
float num8 = Mathf.Clamp(num6, (float)num7, 1f);
this.<crossFader>k__BackingField = num8;
this.OnApply(ik, curves, weight);
}
}
// Token: 0x060028F7 RID: 10487
[Token(Token = "0x60028F7")]
[Address(Slot = "4")]
protected abstract float GetLength(AnimationCurve[] curves);
// Token: 0x060028F8 RID: 10488
[Token(Token = "0x60028F8")]
[Address(Slot = "5")]
protected abstract void CrossFadeStart();
// Token: 0x060028F9 RID: 10489
[Token(Token = "0x60028F9")]
[Address(Slot = "6")]
protected abstract void OnApply(VRIK ik, AnimationCurve[] curves, float weight);
// Token: 0x060028FA RID: 10490 RVA: 0x0005A07C File Offset: 0x0005827C
[Token(Token = "0x60028FA")]
[Address(RVA = "0x1584890", Offset = "0x1583090", VA = "0x181584890")]
protected Offset()
{
}
// Token: 0x0400323E RID: 12862
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x400323E")]
[Tooltip("Just for visual clarity, not used at all")]
public string name;
// Token: 0x0400323F RID: 12863
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x400323F")]
[Tooltip("Linking this hit point to a collider")]
public Collider collider;
// Token: 0x04003240 RID: 12864
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x4003240")]
[SerializeField]
[Tooltip("Only used if this hit point gets hit when already processing another hit")]
private float crossFadeTime = 0.1f;
// Token: 0x04003245 RID: 12869
[FieldOffset(Offset = "0x44")]
[Token(Token = "0x4003245")]
private float length;
// Token: 0x04003246 RID: 12870
[FieldOffset(Offset = "0x48")]
[Token(Token = "0x4003246")]
private float crossFadeSpeed;
// Token: 0x04003247 RID: 12871
[FieldOffset(Offset = "0x4C")]
[Token(Token = "0x4003247")]
private float lastTime;
}
// Token: 0x0200047E RID: 1150
[Token(Token = "0x200047E")]
[Serializable]
public class PositionOffset : HitReactionVRIK.Offset
{
// Token: 0x060028FB RID: 10491 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x60028FB")]
[Address(RVA = "0x158CCB0", Offset = "0x158B4B0", VA = "0x18158CCB0", Slot = "4")]
protected override float GetLength(AnimationCurve[] curves)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x060028FC RID: 10492 RVA: 0x0005A09C File Offset: 0x0005829C
[Token(Token = "0x60028FC")]
[Address(RVA = "0x158CC50", Offset = "0x158B450", VA = "0x18158CC50", Slot = "5")]
protected override void CrossFadeStart()
{
HitReactionVRIK.PositionOffset.PositionOffsetLink[] array = this.offsetLinks;
int num = 0;
int length = array.Length;
if (num < length)
{
array[num].CrossFadeStart();
num++;
}
}
// Token: 0x060028FD RID: 10493 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x60028FD")]
[Address(RVA = "0x158CED0", Offset = "0x158B6D0", VA = "0x18158CED0", Slot = "6")]
protected override void OnApply(VRIK ik, AnimationCurve[] curves, float weight)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x060028FE RID: 10494 RVA: 0x0005A0D4 File Offset: 0x000582D4
[Token(Token = "0x60028FE")]
[Address(RVA = "0x158D150", Offset = "0x158B950", VA = "0x18158D150")]
public PositionOffset()
{
this.crossFadeTime = 0.1f;
base..ctor();
}
// Token: 0x04003248 RID: 12872
[FieldOffset(Offset = "0x50")]
[Token(Token = "0x4003248")]
[Tooltip("Offset magnitude in the direction of the hit force")]
public int forceDirCurveIndex;
// Token: 0x04003249 RID: 12873
[FieldOffset(Offset = "0x54")]
[Token(Token = "0x4003249")]
[Tooltip("Offset magnitude in the direction of character.up")]
public int upDirCurveIndex = (int)((ulong)1L);
// Token: 0x0400324A RID: 12874
[FieldOffset(Offset = "0x58")]
[Token(Token = "0x400324A")]
[Tooltip("Linking this offset to the VRIK position offsets")]
public HitReactionVRIK.PositionOffset.PositionOffsetLink[] offsetLinks;
// Token: 0x0200047F RID: 1151
[Token(Token = "0x200047F")]
[Serializable]
public class PositionOffsetLink
{
// Token: 0x060028FF RID: 10495 RVA: 0x00038FC3 File Offset: 0x000371C3
[Token(Token = "0x60028FF")]
[Address(RVA = "0x12DCE60", Offset = "0x12DB660", VA = "0x1812DCE60")]
public void Apply(VRIK ik, Vector3 offset, float crossFader)
{
}
// Token: 0x06002900 RID: 10496 RVA: 0x00038FC3 File Offset: 0x000371C3
[Token(Token = "0x6002900")]
[Address(RVA = "0x12DC3F0", Offset = "0x12DABF0", VA = "0x1812DC3F0")]
public void CrossFadeStart()
{
}
// Token: 0x06002901 RID: 10497 RVA: 0x00038FC3 File Offset: 0x000371C3
[Token(Token = "0x6002901")]
[Address(RVA = "0x43A830", Offset = "0x439030", VA = "0x18043A830")]
public PositionOffsetLink()
{
}
// Token: 0x0400324B RID: 12875
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x400324B")]
[Tooltip("The FBBIK effector type")]
public IKSolverVR.PositionOffset positionOffset;
// Token: 0x0400324C RID: 12876
[FieldOffset(Offset = "0x14")]
[Token(Token = "0x400324C")]
[Tooltip("The weight of this effector (could also be negative)")]
public float weight;
// Token: 0x0400324D RID: 12877
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x400324D")]
private Vector3 lastValue;
// Token: 0x0400324E RID: 12878
[FieldOffset(Offset = "0x24")]
[Token(Token = "0x400324E")]
private Vector3 current;
}
}
// Token: 0x02000480 RID: 1152
[Token(Token = "0x2000480")]
[Serializable]
public class RotationOffset : HitReactionVRIK.Offset
{
// Token: 0x06002902 RID: 10498 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002902")]
[Address(RVA = "0x158D2F0", Offset = "0x158BAF0", VA = "0x18158D2F0", Slot = "4")]
protected override float GetLength(AnimationCurve[] curves)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002903 RID: 10499 RVA: 0x0005A0FC File Offset: 0x000582FC
[Token(Token = "0x6002903")]
[Address(RVA = "0x158D290", Offset = "0x158BA90", VA = "0x18158D290", Slot = "5")]
protected override void CrossFadeStart()
{
HitReactionVRIK.RotationOffset.RotationOffsetLink[] array = this.offsetLinks;
int num = 0;
int length = array.Length;
if (num < length)
{
array[num].CrossFadeStart();
num++;
}
}
// Token: 0x06002904 RID: 10500 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002904")]
[Address(RVA = "0x158D410", Offset = "0x158BC10", VA = "0x18158D410", Slot = "6")]
protected override void OnApply(VRIK ik, AnimationCurve[] curves, float weight)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002905 RID: 10501 RVA: 0x0005A134 File Offset: 0x00058334
[Token(Token = "0x6002905")]
[Address(RVA = "0x1584890", Offset = "0x1583090", VA = "0x181584890")]
public RotationOffset()
{
this.crossFadeTime = 0.1f;
base..ctor();
}
// Token: 0x0400324F RID: 12879
[FieldOffset(Offset = "0x50")]
[Token(Token = "0x400324F")]
[Tooltip("The angle to rotate the bone around it's rigidbody's world center of mass")]
public int curveIndex;
// Token: 0x04003250 RID: 12880
[FieldOffset(Offset = "0x58")]
[Token(Token = "0x4003250")]
[Tooltip("Linking this hit point to bone(s)")]
public HitReactionVRIK.RotationOffset.RotationOffsetLink[] offsetLinks;
// Token: 0x04003251 RID: 12881
[FieldOffset(Offset = "0x60")]
[Token(Token = "0x4003251")]
private Rigidbody rigidbody;
// Token: 0x02000481 RID: 1153
[Token(Token = "0x2000481")]
[Serializable]
public class RotationOffsetLink
{
// Token: 0x06002906 RID: 10502 RVA: 0x00038FC3 File Offset: 0x000371C3
[Token(Token = "0x6002906")]
[Address(RVA = "0x12DE5A0", Offset = "0x12DCDA0", VA = "0x1812DE5A0")]
public void Apply(VRIK ik, Quaternion offset, float crossFader)
{
}
// Token: 0x06002907 RID: 10503 RVA: 0x00038FC3 File Offset: 0x000371C3
[Token(Token = "0x6002907")]
[Address(RVA = "0x12DE690", Offset = "0x12DCE90", VA = "0x1812DE690")]
public void CrossFadeStart()
{
}
// Token: 0x06002908 RID: 10504 RVA: 0x00038FC3 File Offset: 0x000371C3
[Token(Token = "0x6002908")]
[Address(RVA = "0x12DE6A0", Offset = "0x12DCEA0", VA = "0x1812DE6A0")]
public RotationOffsetLink()
{
}
// Token: 0x04003252 RID: 12882
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4003252")]
[Tooltip("Reference to the bone that this hit point rotates")]
public IKSolverVR.RotationOffset rotationOffset;
// Token: 0x04003253 RID: 12883
[FieldOffset(Offset = "0x14")]
[Token(Token = "0x4003253")]
[Tooltip("Weight of rotating the bone")]
[Range(0f, 1f)]
public float weight;
// Token: 0x04003254 RID: 12884
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4003254")]
private Quaternion lastValue;
// Token: 0x04003255 RID: 12885
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x4003255")]
private Quaternion current;
}
}
}
}