134 lines
4.3 KiB
C#
134 lines
4.3 KiB
C#
using System;
|
|
using Cpp2IlInjected;
|
|
using RootMotion.FinalIK;
|
|
using UnityEngine;
|
|
|
|
namespace RootMotion.Demos
|
|
{
|
|
// Token: 0x020003AF RID: 943
|
|
[Token(Token = "0x20003AF")]
|
|
public class AnimationWarping : OffsetModifier
|
|
{
|
|
// Token: 0x0600231C RID: 8988 RVA: 0x00050918 File Offset: 0x0004EB18
|
|
[Token(Token = "0x600231C")]
|
|
[Address(RVA = "0x8CD240", Offset = "0x8CC040", VA = "0x1808CD240", Slot = "5")]
|
|
protected override void Start()
|
|
{
|
|
base.Start();
|
|
AnimationWarping.EffectorMode effectorMode = this.effectorMode;
|
|
this.lastMode = effectorMode;
|
|
}
|
|
|
|
// Token: 0x0600231D RID: 8989 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x600231D")]
|
|
[Address(RVA = "0x8CCAB0", Offset = "0x8CB8B0", VA = "0x1808CCAB0")]
|
|
public float GetWarpWeight(int warpIndex)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x0600231E RID: 8990 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x600231E")]
|
|
[Address(RVA = "0x8CCDF0", Offset = "0x8CBBF0", VA = "0x1808CCDF0", Slot = "4")]
|
|
protected override void OnModifyOffset()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x0600231F RID: 8991 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x600231F")]
|
|
[Address(RVA = "0x8CCD40", Offset = "0x8CBB40", VA = "0x1808CCD40")]
|
|
private void OnDisable()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002320 RID: 8992 RVA: 0x0005093C File Offset: 0x0004EB3C
|
|
[Token(Token = "0x6002320")]
|
|
[Address(RVA = "0x8CD260", Offset = "0x8CC060", VA = "0x1808CD260")]
|
|
public AnimationWarping()
|
|
{
|
|
}
|
|
|
|
// Token: 0x04002C65 RID: 11365
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x4002C65")]
|
|
[Tooltip("Reference to the Animator component to use")]
|
|
public Animator animator;
|
|
|
|
// Token: 0x04002C66 RID: 11366
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x4002C66")]
|
|
[Tooltip("Using effector.positionOffset or effector.position with effector.positionWeight? The former will enable you to use effector.position for other things, the latter will weigh in the effectors, hence using Reach and Pull in the process.")]
|
|
public AnimationWarping.EffectorMode effectorMode;
|
|
|
|
// Token: 0x04002C67 RID: 11367
|
|
[FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x4002C67")]
|
|
[Space]
|
|
[Tooltip("The array of warps, can have multiple simultaneous warps.")]
|
|
[Space(10f)]
|
|
public AnimationWarping.Warp[] warps;
|
|
|
|
// Token: 0x04002C68 RID: 11368
|
|
[FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x4002C68")]
|
|
private AnimationWarping.EffectorMode lastMode;
|
|
|
|
// Token: 0x020003B0 RID: 944
|
|
[Token(Token = "0x20003B0")]
|
|
[Serializable]
|
|
public struct Warp
|
|
{
|
|
// Token: 0x04002C69 RID: 11369
|
|
[FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x4002C69")]
|
|
[Tooltip("Layer of the 'Animation State' in the Animator.")]
|
|
public int animationLayer;
|
|
|
|
// Token: 0x04002C6A RID: 11370
|
|
[FieldOffset(Offset = "0x8")]
|
|
[Token(Token = "0x4002C6A")]
|
|
[Tooltip("Name of the state in the Animator to warp.")]
|
|
public string animationState;
|
|
|
|
// Token: 0x04002C6B RID: 11371
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4002C6B")]
|
|
[Tooltip("Warping weight by normalized time of the animation state.")]
|
|
public AnimationCurve weightCurve;
|
|
|
|
// Token: 0x04002C6C RID: 11372
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4002C6C")]
|
|
[Tooltip("Animated point to warp from. This should be in character space so keep this Transform parented to the root of the character.")]
|
|
public Transform warpFrom;
|
|
|
|
// Token: 0x04002C6D RID: 11373
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4002C6D")]
|
|
[Tooltip("World space point to warp to.")]
|
|
public Transform warpTo;
|
|
|
|
// Token: 0x04002C6E RID: 11374
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4002C6E")]
|
|
[Tooltip("Which FBBIK effector to use?")]
|
|
public FullBodyBipedEffector effector;
|
|
}
|
|
|
|
// Token: 0x020003B1 RID: 945
|
|
[Token(Token = "0x20003B1")]
|
|
[Serializable]
|
|
public enum EffectorMode
|
|
{
|
|
// Token: 0x04002C70 RID: 11376
|
|
[Token(Token = "0x4002C70")]
|
|
PositionOffset,
|
|
// Token: 0x04002C71 RID: 11377
|
|
[Token(Token = "0x4002C71")]
|
|
Position
|
|
}
|
|
}
|
|
}
|