523 lines
14 KiB
C#
523 lines
14 KiB
C#
using System;
|
|
using System.Diagnostics;
|
|
using System.Threading;
|
|
using UnityEngine;
|
|
|
|
// Token: 0x02000BB1 RID: 2993
|
|
public class Interpolator : MonoBehaviour
|
|
{
|
|
// Token: 0x06016A49 RID: 92745 RVA: 0x0064FFD0 File Offset: 0x0064E1D0
|
|
private void PLFBHLHGJLN()
|
|
{
|
|
if (this.CCNDECMGNJJ)
|
|
{
|
|
float num = Time.deltaTime * this.rotationSpeed;
|
|
base.transform.rotation = Quaternion.RotateTowards(base.transform.rotation, this.INMMPMMNFJF, num);
|
|
float num2 = Quaternion.Angle(this.INMMPMMNFJF, base.transform.rotation);
|
|
if (num2 < num)
|
|
{
|
|
this.CCNDECMGNJJ = false;
|
|
base.transform.rotation = this.INMMPMMNFJF;
|
|
if (this.MKOGJIEKNIF != null)
|
|
{
|
|
this.MKOGJIEKNIF(this.INMMPMMNFJF);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06016A4A RID: 92746 RVA: 0x0065006C File Offset: 0x0064E26C
|
|
public void BNBOJBNGGKL(Action<Quaternion> NOBAPCOKFIL)
|
|
{
|
|
Action<Quaternion> action = this.MKOGJIEKNIF;
|
|
Action<Quaternion> action2;
|
|
do
|
|
{
|
|
action2 = action;
|
|
action = Interlocked.CompareExchange<Action<Quaternion>>(ref this.MKOGJIEKNIF, (Action<Quaternion>)Delegate.Combine(action2, NOBAPCOKFIL), action);
|
|
}
|
|
while (action != action2);
|
|
}
|
|
|
|
// Token: 0x06016A4B RID: 92747 RVA: 0x006500A4 File Offset: 0x0064E2A4
|
|
private void GEDDKIMKKNA()
|
|
{
|
|
if (this.JPHHBMAPMMP)
|
|
{
|
|
float num = Time.deltaTime * this.scaleSpeed;
|
|
base.transform.localScale = Vector3.MoveTowards(base.transform.localScale, this.FNLFCPNEJIP(), num);
|
|
float magnitude = (this.FNLFCPNEJIP() - base.transform.localScale).magnitude;
|
|
if (magnitude < num)
|
|
{
|
|
this.JPHHBMAPMMP = false;
|
|
base.transform.localScale = this.FNLFCPNEJIP();
|
|
if (this.JMEEDDBGGPF != null)
|
|
{
|
|
this.JMEEDDBGGPF(this.FNLFCPNEJIP());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x140000B6 RID: 182
|
|
// (add) Token: 0x06016A4D RID: 92749 RVA: 0x00650180 File Offset: 0x0064E380
|
|
// (remove) Token: 0x06016A4C RID: 92748 RVA: 0x00650148 File Offset: 0x0064E348
|
|
[field: DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
|
public event Action<Vector3> MGKJMPMHBFC;
|
|
|
|
// Token: 0x170009AE RID: 2478
|
|
// (get) Token: 0x06016A4F RID: 92751 RVA: 0x006501D0 File Offset: 0x0064E3D0
|
|
// (set) Token: 0x06016A4E RID: 92750 RVA: 0x006501B8 File Offset: 0x0064E3B8
|
|
public Vector3 KIJCBJAJPID
|
|
{
|
|
get
|
|
{
|
|
if (this.HOHBADKBJOP)
|
|
{
|
|
return (!(this.JPBABNNJDGB != null)) ? this.PIBEDGDDMEK : this.JPBABNNJDGB.position;
|
|
}
|
|
return base.transform.position;
|
|
}
|
|
set
|
|
{
|
|
this.PIBEDGDDMEK = value;
|
|
this.HOHBADKBJOP = true;
|
|
base.enabled = true;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06016A50 RID: 92752 RVA: 0x00650210 File Offset: 0x0064E410
|
|
public void BDHFNEGLLGA()
|
|
{
|
|
base.transform.position = this.AAOFJCJMHBE();
|
|
base.transform.rotation = this.INMMPMMNFJF;
|
|
base.transform.localScale = this.FNLFCPNEJIP();
|
|
this.StopInterpolation();
|
|
}
|
|
|
|
// Token: 0x140000B8 RID: 184
|
|
// (add) Token: 0x06016A51 RID: 92753 RVA: 0x0065024C File Offset: 0x0064E44C
|
|
// (remove) Token: 0x06016A67 RID: 92775 RVA: 0x00650834 File Offset: 0x0064EA34
|
|
[field: DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
|
public event Action<Vector3> JMEEDDBGGPF;
|
|
|
|
// Token: 0x06016A52 RID: 92754 RVA: 0x00650284 File Offset: 0x0064E484
|
|
public Vector3 FNLFCPNEJIP()
|
|
{
|
|
if (this.JPHHBMAPMMP)
|
|
{
|
|
return this.AEKAEIJJGBL;
|
|
}
|
|
return base.transform.localScale;
|
|
}
|
|
|
|
// Token: 0x170009AD RID: 2477
|
|
// (set) Token: 0x06016A53 RID: 92755 RVA: 0x006502A4 File Offset: 0x0064E4A4
|
|
public Transform PJEKMIPLKHP
|
|
{
|
|
set
|
|
{
|
|
this.JPBABNNJDGB = value;
|
|
this.HOHBADKBJOP = true;
|
|
this.CCNDECMGNJJ = true;
|
|
base.enabled = true;
|
|
}
|
|
}
|
|
|
|
// Token: 0x170009B0 RID: 2480
|
|
// (get) Token: 0x06016A54 RID: 92756 RVA: 0x006502C4 File Offset: 0x0064E4C4
|
|
// (set) Token: 0x06016A6F RID: 92783 RVA: 0x00650A44 File Offset: 0x0064EC44
|
|
public Vector3 ILHBGANNFLB
|
|
{
|
|
get
|
|
{
|
|
if (this.JPHHBMAPMMP)
|
|
{
|
|
return this.AEKAEIJJGBL;
|
|
}
|
|
return base.transform.localScale;
|
|
}
|
|
set
|
|
{
|
|
this.AEKAEIJJGBL = value;
|
|
this.JPHHBMAPMMP = true;
|
|
base.enabled = true;
|
|
}
|
|
}
|
|
|
|
// Token: 0x140000B7 RID: 183
|
|
// (add) Token: 0x06016A55 RID: 92757 RVA: 0x006502E4 File Offset: 0x0064E4E4
|
|
// (remove) Token: 0x06016A64 RID: 92772 RVA: 0x006507A4 File Offset: 0x0064E9A4
|
|
[field: DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
|
public event Action<Quaternion> MKOGJIEKNIF;
|
|
|
|
// Token: 0x06016A56 RID: 92758 RVA: 0x0065031C File Offset: 0x0064E51C
|
|
private void LELBEPLMJMG()
|
|
{
|
|
if (this.HOHBADKBJOP)
|
|
{
|
|
float num = Time.deltaTime * this.movementSpeed;
|
|
if (this.UseMovementEaseIn)
|
|
{
|
|
float num2 = Mathf.Clamp01((this.KIJCBJAJPID - base.transform.position).magnitude / this.MovementEaseInDistance) * this.MovementEaseInPercent + (1f - this.MovementEaseInPercent);
|
|
num *= num2;
|
|
}
|
|
base.transform.position = Vector3.MoveTowards(base.transform.position, this.KIJCBJAJPID, num);
|
|
float magnitude = (this.KIJCBJAJPID - base.transform.position).magnitude;
|
|
if (magnitude < num)
|
|
{
|
|
this.HOHBADKBJOP = false;
|
|
base.transform.position = this.KIJCBJAJPID;
|
|
if (this.MGKJMPMHBFC != null)
|
|
{
|
|
this.MGKJMPMHBFC(this.KIJCBJAJPID);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x170009AC RID: 2476
|
|
// (get) Token: 0x06016A57 RID: 92759 RVA: 0x0065040C File Offset: 0x0064E60C
|
|
public bool JLNAELMJMLA
|
|
{
|
|
get
|
|
{
|
|
return base.enabled;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06016A58 RID: 92760 RVA: 0x00650414 File Offset: 0x0064E614
|
|
private void IKAMFHKOBBG()
|
|
{
|
|
if (this.JPHHBMAPMMP)
|
|
{
|
|
float num = Time.deltaTime * this.scaleSpeed;
|
|
base.transform.localScale = Vector3.MoveTowards(base.transform.localScale, this.AKLJBPANDJP(), num);
|
|
float magnitude = (this.FNLFCPNEJIP() - base.transform.localScale).magnitude;
|
|
if (magnitude < num)
|
|
{
|
|
this.JPHHBMAPMMP = true;
|
|
base.transform.localScale = this.ILHBGANNFLB;
|
|
if (this.JMEEDDBGGPF != null)
|
|
{
|
|
this.JMEEDDBGGPF(this.FNLFCPNEJIP());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06016A59 RID: 92761 RVA: 0x006504B8 File Offset: 0x0064E6B8
|
|
public void SnapToTarget()
|
|
{
|
|
base.transform.position = this.KIJCBJAJPID;
|
|
base.transform.rotation = this.INMMPMMNFJF;
|
|
base.transform.localScale = this.ILHBGANNFLB;
|
|
this.StopInterpolation();
|
|
}
|
|
|
|
// Token: 0x170009AF RID: 2479
|
|
// (get) Token: 0x06016A5A RID: 92762 RVA: 0x006504F4 File Offset: 0x0064E6F4
|
|
// (set) Token: 0x06016A6C RID: 92780 RVA: 0x006509B8 File Offset: 0x0064EBB8
|
|
public Quaternion INMMPMMNFJF
|
|
{
|
|
get
|
|
{
|
|
if (this.CCNDECMGNJJ)
|
|
{
|
|
return (!(this.JPBABNNJDGB != null)) ? this.POGCNKABPBI : this.JPBABNNJDGB.rotation;
|
|
}
|
|
return base.transform.rotation;
|
|
}
|
|
set
|
|
{
|
|
this.POGCNKABPBI = value;
|
|
this.CCNDECMGNJJ = true;
|
|
base.enabled = true;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06016A5B RID: 92763 RVA: 0x00650534 File Offset: 0x0064E734
|
|
public void StopInterpolation()
|
|
{
|
|
this.CCNDECMGNJJ = false;
|
|
this.HOHBADKBJOP = false;
|
|
this.JPHHBMAPMMP = false;
|
|
}
|
|
|
|
// Token: 0x06016A5C RID: 92764 RVA: 0x0065054C File Offset: 0x0064E74C
|
|
public void ABLHCNGGPJG()
|
|
{
|
|
base.transform.position = this.AAOFJCJMHBE();
|
|
base.transform.rotation = this.INMMPMMNFJF;
|
|
base.transform.localScale = this.FNLFCPNEJIP();
|
|
this.StopInterpolation();
|
|
}
|
|
|
|
// Token: 0x06016A5D RID: 92765 RVA: 0x00650588 File Offset: 0x0064E788
|
|
public void CAPGIOGIILO(Action<Vector3> NOBAPCOKFIL)
|
|
{
|
|
Action<Vector3> action = this.MGKJMPMHBFC;
|
|
Action<Vector3> action2;
|
|
do
|
|
{
|
|
action2 = action;
|
|
action = Interlocked.CompareExchange<Action<Vector3>>(ref this.MGKJMPMHBFC, (Action<Vector3>)Delegate.Combine(action2, NOBAPCOKFIL), action);
|
|
}
|
|
while (action != action2);
|
|
}
|
|
|
|
// Token: 0x06016A5E RID: 92766 RVA: 0x006505C0 File Offset: 0x0064E7C0
|
|
private void JKNCELBLLBK()
|
|
{
|
|
if (this.JPHHBMAPMMP)
|
|
{
|
|
float num = Time.deltaTime * this.scaleSpeed;
|
|
base.transform.localScale = Vector3.MoveTowards(base.transform.localScale, this.FNLFCPNEJIP(), num);
|
|
float magnitude = (this.ILHBGANNFLB - base.transform.localScale).magnitude;
|
|
if (magnitude < num)
|
|
{
|
|
this.JPHHBMAPMMP = false;
|
|
base.transform.localScale = this.AKLJBPANDJP();
|
|
if (this.JMEEDDBGGPF != null)
|
|
{
|
|
this.JMEEDDBGGPF(this.AKLJBPANDJP());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06016A5F RID: 92767 RVA: 0x00650664 File Offset: 0x0064E864
|
|
public Vector3 AKLJBPANDJP()
|
|
{
|
|
if (this.JPHHBMAPMMP)
|
|
{
|
|
return this.AEKAEIJJGBL;
|
|
}
|
|
return base.transform.localScale;
|
|
}
|
|
|
|
// Token: 0x06016A60 RID: 92768 RVA: 0x00650684 File Offset: 0x0064E884
|
|
private void DKDGOJGKHDM()
|
|
{
|
|
this.LELBEPLMJMG();
|
|
this.PLFBHLHGJLN();
|
|
this.GEDDKIMKKNA();
|
|
if (!this.HOHBADKBJOP && !this.CCNDECMGNJJ && !this.JPHHBMAPMMP)
|
|
{
|
|
base.enabled = true;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06016A61 RID: 92769 RVA: 0x006506C0 File Offset: 0x0064E8C0
|
|
public void AACFNFIHNGP(Action<Quaternion> NOBAPCOKFIL)
|
|
{
|
|
Action<Quaternion> action = this.MKOGJIEKNIF;
|
|
Action<Quaternion> action2;
|
|
do
|
|
{
|
|
action2 = action;
|
|
action = Interlocked.CompareExchange<Action<Quaternion>>(ref this.MKOGJIEKNIF, (Action<Quaternion>)Delegate.Remove(action2, NOBAPCOKFIL), action);
|
|
}
|
|
while (action != action2);
|
|
}
|
|
|
|
// Token: 0x06016A62 RID: 92770 RVA: 0x006506F8 File Offset: 0x0064E8F8
|
|
private void IENDEJKFBGD()
|
|
{
|
|
if (this.JPHHBMAPMMP)
|
|
{
|
|
float num = Time.deltaTime * this.scaleSpeed;
|
|
base.transform.localScale = Vector3.MoveTowards(base.transform.localScale, this.ILHBGANNFLB, num);
|
|
float magnitude = (this.ILHBGANNFLB - base.transform.localScale).magnitude;
|
|
if (magnitude < num)
|
|
{
|
|
this.JPHHBMAPMMP = false;
|
|
base.transform.localScale = this.ILHBGANNFLB;
|
|
if (this.JMEEDDBGGPF != null)
|
|
{
|
|
this.JMEEDDBGGPF(this.ILHBGANNFLB);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06016A63 RID: 92771 RVA: 0x0065079C File Offset: 0x0064E99C
|
|
public bool CPGMKMPPJDA()
|
|
{
|
|
return base.enabled;
|
|
}
|
|
|
|
// Token: 0x06016A65 RID: 92773 RVA: 0x006507DC File Offset: 0x0064E9DC
|
|
public void AOKKHEAEGEL(Vector3 NOBAPCOKFIL)
|
|
{
|
|
this.PIBEDGDDMEK = NOBAPCOKFIL;
|
|
this.HOHBADKBJOP = true;
|
|
base.enabled = true;
|
|
}
|
|
|
|
// Token: 0x06016A66 RID: 92774 RVA: 0x006507F4 File Offset: 0x0064E9F4
|
|
public Vector3 AAOFJCJMHBE()
|
|
{
|
|
if (this.HOHBADKBJOP)
|
|
{
|
|
return (!(this.JPBABNNJDGB != null)) ? this.PIBEDGDDMEK : this.JPBABNNJDGB.position;
|
|
}
|
|
return base.transform.position;
|
|
}
|
|
|
|
// Token: 0x06016A68 RID: 92776 RVA: 0x0065086C File Offset: 0x0064EA6C
|
|
public void JKJDLKMFOMK(Action<Vector3> NOBAPCOKFIL)
|
|
{
|
|
Action<Vector3> action = this.MGKJMPMHBFC;
|
|
Action<Vector3> action2;
|
|
do
|
|
{
|
|
action2 = action;
|
|
action = Interlocked.CompareExchange<Action<Vector3>>(ref this.MGKJMPMHBFC, (Action<Vector3>)Delegate.Remove(action2, NOBAPCOKFIL), action);
|
|
}
|
|
while (action != action2);
|
|
}
|
|
|
|
// Token: 0x06016A69 RID: 92777 RVA: 0x006508A4 File Offset: 0x0064EAA4
|
|
public void PMPKMFIJIGP(Action<Vector3> NOBAPCOKFIL)
|
|
{
|
|
Action<Vector3> action = this.JMEEDDBGGPF;
|
|
Action<Vector3> action2;
|
|
do
|
|
{
|
|
action2 = action;
|
|
action = Interlocked.CompareExchange<Action<Vector3>>(ref this.JMEEDDBGGPF, (Action<Vector3>)Delegate.Remove(action2, NOBAPCOKFIL), action);
|
|
}
|
|
while (action != action2);
|
|
}
|
|
|
|
// Token: 0x06016A6A RID: 92778 RVA: 0x006508DC File Offset: 0x0064EADC
|
|
private void BIFDGLGAJEH()
|
|
{
|
|
if (this.JPHHBMAPMMP)
|
|
{
|
|
float num = Time.deltaTime * this.scaleSpeed;
|
|
base.transform.localScale = Vector3.MoveTowards(base.transform.localScale, this.FNLFCPNEJIP(), num);
|
|
float magnitude = (this.FNLFCPNEJIP() - base.transform.localScale).magnitude;
|
|
if (magnitude < num)
|
|
{
|
|
this.JPHHBMAPMMP = true;
|
|
base.transform.localScale = this.FNLFCPNEJIP();
|
|
if (this.JMEEDDBGGPF != null)
|
|
{
|
|
this.JMEEDDBGGPF(this.AKLJBPANDJP());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06016A6B RID: 92779 RVA: 0x00650980 File Offset: 0x0064EB80
|
|
public void IJEBAGOAGDP(Action<Vector3> NOBAPCOKFIL)
|
|
{
|
|
Action<Vector3> action = this.MGKJMPMHBFC;
|
|
Action<Vector3> action2;
|
|
do
|
|
{
|
|
action2 = action;
|
|
action = Interlocked.CompareExchange<Action<Vector3>>(ref this.MGKJMPMHBFC, (Action<Vector3>)Delegate.Remove(action2, NOBAPCOKFIL), action);
|
|
}
|
|
while (action != action2);
|
|
}
|
|
|
|
// Token: 0x06016A6D RID: 92781 RVA: 0x006509D0 File Offset: 0x0064EBD0
|
|
public void HLEBGABBEJE(Action<Vector3> NOBAPCOKFIL)
|
|
{
|
|
Action<Vector3> action = this.JMEEDDBGGPF;
|
|
Action<Vector3> action2;
|
|
do
|
|
{
|
|
action2 = action;
|
|
action = Interlocked.CompareExchange<Action<Vector3>>(ref this.JMEEDDBGGPF, (Action<Vector3>)Delegate.Remove(action2, NOBAPCOKFIL), action);
|
|
}
|
|
while (action != action2);
|
|
}
|
|
|
|
// Token: 0x06016A6E RID: 92782 RVA: 0x00650A08 File Offset: 0x0064EC08
|
|
private void Update()
|
|
{
|
|
this.LELBEPLMJMG();
|
|
this.PLFBHLHGJLN();
|
|
this.IENDEJKFBGD();
|
|
if (!this.HOHBADKBJOP && !this.CCNDECMGNJJ && !this.JPHHBMAPMMP)
|
|
{
|
|
base.enabled = false;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06016A71 RID: 92785 RVA: 0x00650AC8 File Offset: 0x0064ECC8
|
|
public void BCMDBNEFOJP(Action<Quaternion> NOBAPCOKFIL)
|
|
{
|
|
Action<Quaternion> action = this.MKOGJIEKNIF;
|
|
Action<Quaternion> action2;
|
|
do
|
|
{
|
|
action2 = action;
|
|
action = Interlocked.CompareExchange<Action<Quaternion>>(ref this.MKOGJIEKNIF, (Action<Quaternion>)Delegate.Remove(action2, NOBAPCOKFIL), action);
|
|
}
|
|
while (action != action2);
|
|
}
|
|
|
|
// Token: 0x06016A72 RID: 92786 RVA: 0x00650B00 File Offset: 0x0064ED00
|
|
public void KHBENMCEDAB(Vector3 NOBAPCOKFIL)
|
|
{
|
|
this.AEKAEIJJGBL = NOBAPCOKFIL;
|
|
this.JPHHBMAPMMP = false;
|
|
base.enabled = true;
|
|
}
|
|
|
|
// Token: 0x04003F48 RID: 16200
|
|
[Header("Movement")]
|
|
public bool UseMovementEaseIn;
|
|
|
|
// Token: 0x04003F49 RID: 16201
|
|
[Tooltip("At what minimum distance should we apply easeIn")]
|
|
public float MovementEaseInDistance = 0.5f;
|
|
|
|
// Token: 0x04003F4A RID: 16202
|
|
[Range(0f, 0.99f)]
|
|
[Tooltip("What percent of the original speed easeIn should effect.")]
|
|
public float MovementEaseInPercent = 0.8f;
|
|
|
|
// Token: 0x04003F4B RID: 16203
|
|
[SerializeField]
|
|
[Tooltip("Meters/second")]
|
|
private float movementSpeed = 2f;
|
|
|
|
// Token: 0x04003F4C RID: 16204
|
|
[SerializeField]
|
|
[Tooltip("Degrees/second")]
|
|
[Header("Rotation")]
|
|
private float rotationSpeed = 90f;
|
|
|
|
// Token: 0x04003F4D RID: 16205
|
|
[SerializeField]
|
|
[Header("Scale")]
|
|
private float scaleSpeed = 2f;
|
|
|
|
// Token: 0x04003F4E RID: 16206
|
|
private Transform JPBABNNJDGB;
|
|
|
|
// Token: 0x04003F4F RID: 16207
|
|
private bool HOHBADKBJOP;
|
|
|
|
// Token: 0x04003F50 RID: 16208
|
|
private Vector3 PIBEDGDDMEK = Vector3.zero;
|
|
|
|
// Token: 0x04003F51 RID: 16209
|
|
private bool CCNDECMGNJJ;
|
|
|
|
// Token: 0x04003F52 RID: 16210
|
|
private Quaternion POGCNKABPBI = Quaternion.identity;
|
|
|
|
// Token: 0x04003F53 RID: 16211
|
|
private bool JPHHBMAPMMP;
|
|
|
|
// Token: 0x04003F54 RID: 16212
|
|
private Vector3 AEKAEIJJGBL = Vector3.zero;
|
|
}
|