212 lines
7.6 KiB
C#
212 lines
7.6 KiB
C#
using System;
|
|
using Cpp2IlInjected;
|
|
using UnityEngine;
|
|
|
|
namespace RootMotion.FinalIK
|
|
{
|
|
// Token: 0x020004A9 RID: 1193
|
|
[Token(Token = "0x20004A9")]
|
|
[AddComponentMenu("Scripts/RootMotion.FinalIK/Interaction System/Interaction Target")]
|
|
[HelpURL("https://www.youtube.com/watch?v=r5jiZnsDH3M")]
|
|
public class InteractionTarget : MonoBehaviour
|
|
{
|
|
// Token: 0x06002AC1 RID: 10945 RVA: 0x0005FD20 File Offset: 0x0005DF20
|
|
[Token(Token = "0x6002AC1")]
|
|
[Address(RVA = "0x104BCE0", Offset = "0x104ACE0", VA = "0x18104BCE0")]
|
|
[ContextMenu("TUTORIAL VIDEO (PART 1: BASICS)")]
|
|
private void OpenTutorial1()
|
|
{
|
|
Application.OpenURL("https://www.youtube.com/watch?v=r5jiZnsDH3M");
|
|
}
|
|
|
|
// Token: 0x06002AC2 RID: 10946 RVA: 0x0005FD38 File Offset: 0x0005DF38
|
|
[Token(Token = "0x6002AC2")]
|
|
[Address(RVA = "0x104BD20", Offset = "0x104AD20", VA = "0x18104BD20")]
|
|
[ContextMenu("TUTORIAL VIDEO (PART 2: PICKING UP...)")]
|
|
private void OpenTutorial2()
|
|
{
|
|
Application.OpenURL("https://www.youtube.com/watch?v=eP9-zycoHLk");
|
|
}
|
|
|
|
// Token: 0x06002AC3 RID: 10947 RVA: 0x0005FD50 File Offset: 0x0005DF50
|
|
[Token(Token = "0x6002AC3")]
|
|
[Address(RVA = "0x104BD60", Offset = "0x104AD60", VA = "0x18104BD60")]
|
|
[ContextMenu("TUTORIAL VIDEO (PART 3: ANIMATION)")]
|
|
private void OpenTutorial3()
|
|
{
|
|
Application.OpenURL("https://www.youtube.com/watch?v=sQfB2RcT1T4&index=14&list=PLVxSIA1OaTOu8Nos3CalXbJ2DrKnntMv6");
|
|
}
|
|
|
|
// Token: 0x06002AC4 RID: 10948 RVA: 0x0005FD68 File Offset: 0x0005DF68
|
|
[Token(Token = "0x6002AC4")]
|
|
[Address(RVA = "0x104BDA0", Offset = "0x104ADA0", VA = "0x18104BDA0")]
|
|
[ContextMenu("TUTORIAL VIDEO (PART 4: TRIGGERS)")]
|
|
private void OpenTutorial4()
|
|
{
|
|
Application.OpenURL("https://www.youtube.com/watch?v=-TDZpNjt2mk&index=15&list=PLVxSIA1OaTOu8Nos3CalXbJ2DrKnntMv6");
|
|
}
|
|
|
|
// Token: 0x06002AC5 RID: 10949 RVA: 0x0005FD80 File Offset: 0x0005DF80
|
|
[Token(Token = "0x6002AC5")]
|
|
[Address(RVA = "0x104C4B0", Offset = "0x104B4B0", VA = "0x18104C4B0")]
|
|
[ContextMenu("Support Group")]
|
|
private void SupportGroup()
|
|
{
|
|
Application.OpenURL("https://groups.google.com/forum/#!forum/final-ik");
|
|
}
|
|
|
|
// Token: 0x06002AC6 RID: 10950 RVA: 0x0005FD98 File Offset: 0x0005DF98
|
|
[Token(Token = "0x6002AC6")]
|
|
[Address(RVA = "0x104BBF0", Offset = "0x104ABF0", VA = "0x18104BBF0")]
|
|
[ContextMenu("Asset Store Thread")]
|
|
private void ASThread()
|
|
{
|
|
Application.OpenURL("http://forum.unity3d.com/threads/final-ik-full-body-ik-aim-look-at-fabrik-ccd-ik-1-0-released.222685/");
|
|
}
|
|
|
|
// Token: 0x06002AC7 RID: 10951 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002AC7")]
|
|
[Address(RVA = "0x104BC30", Offset = "0x104AC30", VA = "0x18104BC30")]
|
|
public float GetValue(InteractionObject.WeightCurve.Type curveType)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002AC8 RID: 10952 RVA: 0x0005FDB0 File Offset: 0x0005DFB0
|
|
[Token(Token = "0x6002AC8")]
|
|
[Address(RVA = "0x104BE20", Offset = "0x104AE20", VA = "0x18104BE20")]
|
|
public void ResetRotation()
|
|
{
|
|
Transform transform = this.pivot;
|
|
int num = 0;
|
|
if (transform != num)
|
|
{
|
|
Transform transform2 = this.pivot;
|
|
Quaternion quaternion = this.defaultLocalRotation;
|
|
transform2.localRotation = quaternion;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06002AC9 RID: 10953 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002AC9")]
|
|
[Address(RVA = "0x104BEB0", Offset = "0x104AEB0", VA = "0x18104BEB0")]
|
|
public void RotateTo(Vector3 position)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002ACA RID: 10954 RVA: 0x0005FDEC File Offset: 0x0005DFEC
|
|
[Token(Token = "0x6002ACA")]
|
|
[Address(RVA = "0x104BDE0", Offset = "0x104ADE0", VA = "0x18104BDE0")]
|
|
[ContextMenu("User Manual")]
|
|
private void OpenUserManual()
|
|
{
|
|
Application.OpenURL("http://www.root-motion.com/finalikdox/html/page10.html");
|
|
}
|
|
|
|
// Token: 0x06002ACB RID: 10955 RVA: 0x0005FE04 File Offset: 0x0005E004
|
|
[Token(Token = "0x6002ACB")]
|
|
[Address(RVA = "0x104BCA0", Offset = "0x104ACA0", VA = "0x18104BCA0")]
|
|
[ContextMenu("Scrpt Reference")]
|
|
private void OpenScriptReference()
|
|
{
|
|
Application.OpenURL("http://www.root-motion.com/finalikdox/html/class_root_motion_1_1_final_i_k_1_1_interaction_target.html");
|
|
}
|
|
|
|
// Token: 0x06002ACC RID: 10956 RVA: 0x0005FE1C File Offset: 0x0005E01C
|
|
[Token(Token = "0x6002ACC")]
|
|
[Address(RVA = "0x104C4F0", Offset = "0x104B4F0", VA = "0x18104C4F0")]
|
|
public InteractionTarget()
|
|
{
|
|
float z = Vector3.up.z;
|
|
this.twistAxis.z = z;
|
|
this.twistWeight = 1f;
|
|
this.rotateOnce = true;
|
|
base..ctor();
|
|
}
|
|
|
|
// Token: 0x04003445 RID: 13381
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4003445")]
|
|
[Tooltip("The type of the FBBIK effector.")]
|
|
public FullBodyBipedEffector effectorType;
|
|
|
|
// Token: 0x04003446 RID: 13382
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4003446")]
|
|
[Tooltip("InteractionObject weight curve multipliers for this effector target.")]
|
|
public InteractionTarget.Multiplier[] multipliers;
|
|
|
|
// Token: 0x04003447 RID: 13383
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4003447")]
|
|
[Tooltip("The interaction speed multiplier for this effector. This can be used to make interactions faster/slower for specific effectors.")]
|
|
public float interactionSpeedMlp = 1f;
|
|
|
|
// Token: 0x04003448 RID: 13384
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x4003448")]
|
|
[Tooltip("The pivot to twist/swing this interaction target about. For symmetric objects that can be interacted with from a certain angular range.")]
|
|
public Transform pivot;
|
|
|
|
// Token: 0x04003449 RID: 13385
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x4003449")]
|
|
[Tooltip("The axis of twisting the interaction target (blue line).")]
|
|
public Vector3 twistAxis;
|
|
|
|
// Token: 0x0400344A RID: 13386
|
|
[FieldOffset(Offset = "0x44")]
|
|
[Token(Token = "0x400344A")]
|
|
[Tooltip("The weight of twisting the interaction target towards the effector bone in the start of the interaction.")]
|
|
public float twistWeight;
|
|
|
|
// Token: 0x0400344B RID: 13387
|
|
[FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x400344B")]
|
|
[Tooltip("The weight of swinging the interaction target towards the effector bone in the start of the interaction. Swing is defined as a 3-DOF rotation around any axis, while twist is only around the twist axis.")]
|
|
public float swingWeight;
|
|
|
|
// Token: 0x0400344C RID: 13388
|
|
[FieldOffset(Offset = "0x4C")]
|
|
[Token(Token = "0x400344C")]
|
|
[Tooltip("If true, will twist/swing around the pivot only once at the start of the interaction. If false, will continue rotating throuout the whole interaction.")]
|
|
public bool rotateOnce;
|
|
|
|
// Token: 0x0400344D RID: 13389
|
|
[FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x400344D")]
|
|
private Quaternion defaultLocalRotation;
|
|
|
|
// Token: 0x0400344E RID: 13390
|
|
[FieldOffset(Offset = "0x60")]
|
|
[Token(Token = "0x400344E")]
|
|
private Transform lastPivot;
|
|
|
|
// Token: 0x020004AA RID: 1194
|
|
[Token(Token = "0x20004AA")]
|
|
[Serializable]
|
|
public class Multiplier
|
|
{
|
|
// Token: 0x06002ACD RID: 10957 RVA: 0x0005FE64 File Offset: 0x0005E064
|
|
[Token(Token = "0x6002ACD")]
|
|
[Address(RVA = "0x36ABD0", Offset = "0x369BD0", VA = "0x18036ABD0")]
|
|
public Multiplier()
|
|
{
|
|
}
|
|
|
|
// Token: 0x0400344F RID: 13391
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x400344F")]
|
|
[Tooltip("The curve type (InteractionObject.WeightCurve.Type).")]
|
|
public InteractionObject.WeightCurve.Type curve;
|
|
|
|
// Token: 0x04003450 RID: 13392
|
|
[FieldOffset(Offset = "0x14")]
|
|
[Token(Token = "0x4003450")]
|
|
[Tooltip("Multiplier of the curve's value.")]
|
|
public float multiplier;
|
|
}
|
|
}
|
|
}
|