756 lines
25 KiB
C#
756 lines
25 KiB
C#
using System;
|
|
using UnityEngine;
|
|
|
|
// Token: 0x02000BAA RID: 2986
|
|
public class AxisConstrainedRigidbodyPickup : RigidbodyPickup
|
|
{
|
|
// Token: 0x06016974 RID: 92532 RVA: 0x0064813C File Offset: 0x0064633C
|
|
public void SetAllConstraints(bool OIJCKMKEELG)
|
|
{
|
|
AxisConstrainedRigidbodyPickup.HNDFJBPOKLF hndfjbpoklf = ((!OIJCKMKEELG) ? AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.All : AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None);
|
|
this.allowMovementOnX = (this.allowMovementOnY = (this.allowMovementOnZ = hndfjbpoklf));
|
|
this.allowRotationOnX = (this.allowRotationOnY = (this.allowRotationOnZ = !OIJCKMKEELG));
|
|
this.constrainToSphere = OIJCKMKEELG;
|
|
}
|
|
|
|
// Token: 0x06016975 RID: 92533 RVA: 0x00648194 File Offset: 0x00646394
|
|
public virtual Vector3 KPOKEFOHKFI()
|
|
{
|
|
Vector3 vector = base.transform.InverseTransformPoint(base.KIJCBJAJPID);
|
|
if (this.allowMovementOnX != (AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)4)
|
|
{
|
|
if (this.allowMovementOnX == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.x = 1746f;
|
|
}
|
|
else
|
|
{
|
|
vector.x = ((this.allowMovementOnX != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(1290f, vector.x) : Mathf.Min(1902f, vector.x));
|
|
}
|
|
}
|
|
if (this.allowMovementOnY != (AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)6)
|
|
{
|
|
if (this.allowMovementOnY == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.y = 1501f;
|
|
}
|
|
else
|
|
{
|
|
vector.y = ((this.allowMovementOnY != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(1735f, vector.y) : Mathf.Min(1239f, vector.y));
|
|
}
|
|
}
|
|
if (this.allowMovementOnZ != (AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)6)
|
|
{
|
|
if (this.allowMovementOnZ == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.z = 96f;
|
|
}
|
|
else
|
|
{
|
|
vector.z = ((this.allowMovementOnZ != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(721f, vector.z) : Mathf.Min(1686f, vector.z));
|
|
}
|
|
}
|
|
vector = base.transform.TransformPoint(vector);
|
|
if (this.constrainToSphere)
|
|
{
|
|
Vector3 vector2 = vector - this.sphericalRestrictionCenter;
|
|
if (vector2.sqrMagnitude > this.sphericalRestrictionRadius * this.sphericalRestrictionRadius)
|
|
{
|
|
vector = this.sphericalRestrictionCenter + vector2.normalized * this.sphericalRestrictionRadius;
|
|
}
|
|
}
|
|
return vector;
|
|
}
|
|
|
|
// Token: 0x06016976 RID: 92534 RVA: 0x00648338 File Offset: 0x00646538
|
|
public virtual Quaternion PFNKPANCNBN()
|
|
{
|
|
Vector3 eulerAngles = base.transform.MCKNNGGGBDG(base.FJHEHAJCKKG()).eulerAngles;
|
|
if (!this.allowRotationOnX)
|
|
{
|
|
eulerAngles.x = 1239f;
|
|
}
|
|
if (!this.allowRotationOnY)
|
|
{
|
|
eulerAngles.y = 158f;
|
|
}
|
|
if (!this.allowRotationOnZ)
|
|
{
|
|
eulerAngles.z = 857f;
|
|
}
|
|
return base.transform.PAFJLHMDIMO(Quaternion.Euler(eulerAngles));
|
|
}
|
|
|
|
// Token: 0x06016977 RID: 92535 RVA: 0x006483B8 File Offset: 0x006465B8
|
|
public virtual Quaternion OEBDJFIDPAO()
|
|
{
|
|
Vector3 eulerAngles = base.transform.MCKNNGGGBDG(base.MGKEEGDPIKK()).eulerAngles;
|
|
if (!this.allowRotationOnX)
|
|
{
|
|
eulerAngles.x = 1176f;
|
|
}
|
|
if (!this.allowRotationOnY)
|
|
{
|
|
eulerAngles.y = 2f;
|
|
}
|
|
if (!this.allowRotationOnZ)
|
|
{
|
|
eulerAngles.z = 1103f;
|
|
}
|
|
return base.transform.PAFJLHMDIMO(Quaternion.Euler(eulerAngles));
|
|
}
|
|
|
|
// Token: 0x170009AB RID: 2475
|
|
// (get) Token: 0x06016978 RID: 92536 RVA: 0x00648438 File Offset: 0x00646638
|
|
public override Quaternion INMMPMMNFJF
|
|
{
|
|
get
|
|
{
|
|
Vector3 eulerAngles = base.transform.MCKNNGGGBDG(base.INMMPMMNFJF).eulerAngles;
|
|
if (!this.allowRotationOnX)
|
|
{
|
|
eulerAngles.x = 0f;
|
|
}
|
|
if (!this.allowRotationOnY)
|
|
{
|
|
eulerAngles.y = 0f;
|
|
}
|
|
if (!this.allowRotationOnZ)
|
|
{
|
|
eulerAngles.z = 0f;
|
|
}
|
|
return base.transform.PAFJLHMDIMO(Quaternion.Euler(eulerAngles));
|
|
}
|
|
}
|
|
|
|
// Token: 0x170009AA RID: 2474
|
|
// (get) Token: 0x06016979 RID: 92537 RVA: 0x006484B8 File Offset: 0x006466B8
|
|
public override Vector3 KIJCBJAJPID
|
|
{
|
|
get
|
|
{
|
|
Vector3 vector = base.transform.InverseTransformPoint(base.KIJCBJAJPID);
|
|
if (this.allowMovementOnX != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.All)
|
|
{
|
|
if (this.allowMovementOnX == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.x = 0f;
|
|
}
|
|
else
|
|
{
|
|
vector.x = ((this.allowMovementOnX != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(0f, vector.x) : Mathf.Min(0f, vector.x));
|
|
}
|
|
}
|
|
if (this.allowMovementOnY != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.All)
|
|
{
|
|
if (this.allowMovementOnY == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.y = 0f;
|
|
}
|
|
else
|
|
{
|
|
vector.y = ((this.allowMovementOnY != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(0f, vector.y) : Mathf.Min(0f, vector.y));
|
|
}
|
|
}
|
|
if (this.allowMovementOnZ != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.All)
|
|
{
|
|
if (this.allowMovementOnZ == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.z = 0f;
|
|
}
|
|
else
|
|
{
|
|
vector.z = ((this.allowMovementOnZ != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(0f, vector.z) : Mathf.Min(0f, vector.z));
|
|
}
|
|
}
|
|
vector = base.transform.TransformPoint(vector);
|
|
if (this.constrainToSphere)
|
|
{
|
|
Vector3 vector2 = vector - this.sphericalRestrictionCenter;
|
|
if (vector2.sqrMagnitude > this.sphericalRestrictionRadius * this.sphericalRestrictionRadius)
|
|
{
|
|
vector = this.sphericalRestrictionCenter + vector2.normalized * this.sphericalRestrictionRadius;
|
|
}
|
|
}
|
|
return vector;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0601697A RID: 92538 RVA: 0x0064865C File Offset: 0x0064685C
|
|
public void LIGFPLMOFCP(bool OIJCKMKEELG)
|
|
{
|
|
AxisConstrainedRigidbodyPickup.HNDFJBPOKLF hndfjbpoklf = ((!OIJCKMKEELG) ? ((AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)3) : AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Positive);
|
|
this.allowMovementOnX = (this.allowMovementOnY = (this.allowMovementOnZ = hndfjbpoklf));
|
|
this.allowRotationOnX = (this.allowRotationOnY = (this.allowRotationOnZ = OIJCKMKEELG));
|
|
this.constrainToSphere = OIJCKMKEELG;
|
|
}
|
|
|
|
// Token: 0x0601697B RID: 92539 RVA: 0x006486B4 File Offset: 0x006468B4
|
|
public virtual Vector3 KDKOBKDCHHD()
|
|
{
|
|
Vector3 vector = base.transform.InverseTransformPoint(base.NIPACIOAHKA());
|
|
if (this.allowMovementOnX != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
if (this.allowMovementOnX == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.x = 988f;
|
|
}
|
|
else
|
|
{
|
|
vector.x = ((this.allowMovementOnX != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(750f, vector.x) : Mathf.Min(1313f, vector.x));
|
|
}
|
|
}
|
|
if (this.allowMovementOnY != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Positive)
|
|
{
|
|
if (this.allowMovementOnY == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.y = 223f;
|
|
}
|
|
else
|
|
{
|
|
vector.y = ((this.allowMovementOnY != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(1346f, vector.y) : Mathf.Min(1225f, vector.y));
|
|
}
|
|
}
|
|
if (this.allowMovementOnZ != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
if (this.allowMovementOnZ == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.z = 168f;
|
|
}
|
|
else
|
|
{
|
|
vector.z = ((this.allowMovementOnZ != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(304f, vector.z) : Mathf.Min(295f, vector.z));
|
|
}
|
|
}
|
|
vector = base.transform.TransformPoint(vector);
|
|
if (this.constrainToSphere)
|
|
{
|
|
Vector3 vector2 = vector - this.sphericalRestrictionCenter;
|
|
if (vector2.sqrMagnitude > this.sphericalRestrictionRadius * this.sphericalRestrictionRadius)
|
|
{
|
|
vector = this.sphericalRestrictionCenter + vector2.normalized * this.sphericalRestrictionRadius;
|
|
}
|
|
}
|
|
return vector;
|
|
}
|
|
|
|
// Token: 0x0601697C RID: 92540 RVA: 0x00648858 File Offset: 0x00646A58
|
|
public virtual Quaternion IHKIDKCPIHL()
|
|
{
|
|
Vector3 eulerAngles = base.transform.MCKNNGGGBDG(base.GJLOMOIAHMP()).eulerAngles;
|
|
if (!this.allowRotationOnX)
|
|
{
|
|
eulerAngles.x = 495f;
|
|
}
|
|
if (!this.allowRotationOnY)
|
|
{
|
|
eulerAngles.y = 1942f;
|
|
}
|
|
if (!this.allowRotationOnZ)
|
|
{
|
|
eulerAngles.z = 115f;
|
|
}
|
|
return base.transform.PAFJLHMDIMO(Quaternion.Euler(eulerAngles));
|
|
}
|
|
|
|
// Token: 0x0601697D RID: 92541 RVA: 0x006488D8 File Offset: 0x00646AD8
|
|
public virtual Vector3 GAPDEGJACGE()
|
|
{
|
|
Vector3 vector = base.transform.InverseTransformPoint(base.KIJCBJAJPID);
|
|
if (this.allowMovementOnX != (AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)8)
|
|
{
|
|
if (this.allowMovementOnX == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.x = 1341f;
|
|
}
|
|
else
|
|
{
|
|
vector.x = ((this.allowMovementOnX != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(1411f, vector.x) : Mathf.Min(947f, vector.x));
|
|
}
|
|
}
|
|
if (this.allowMovementOnY != (AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)6)
|
|
{
|
|
if (this.allowMovementOnY == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.y = 901f;
|
|
}
|
|
else
|
|
{
|
|
vector.y = ((this.allowMovementOnY != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(1259f, vector.y) : Mathf.Min(495f, vector.y));
|
|
}
|
|
}
|
|
if (this.allowMovementOnZ != (AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)7)
|
|
{
|
|
if (this.allowMovementOnZ == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.z = 368f;
|
|
}
|
|
else
|
|
{
|
|
vector.z = ((this.allowMovementOnZ != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(667f, vector.z) : Mathf.Min(287f, vector.z));
|
|
}
|
|
}
|
|
vector = base.transform.TransformPoint(vector);
|
|
if (this.constrainToSphere)
|
|
{
|
|
Vector3 vector2 = vector - this.sphericalRestrictionCenter;
|
|
if (vector2.sqrMagnitude > this.sphericalRestrictionRadius * this.sphericalRestrictionRadius)
|
|
{
|
|
vector = this.sphericalRestrictionCenter + vector2.normalized * this.sphericalRestrictionRadius;
|
|
}
|
|
}
|
|
return vector;
|
|
}
|
|
|
|
// Token: 0x0601697E RID: 92542 RVA: 0x00648A7C File Offset: 0x00646C7C
|
|
public void CHJKLMBFIDM(bool OIJCKMKEELG)
|
|
{
|
|
AxisConstrainedRigidbodyPickup.HNDFJBPOKLF hndfjbpoklf = ((!OIJCKMKEELG) ? AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None : AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Positive);
|
|
this.allowMovementOnX = (this.allowMovementOnY = (this.allowMovementOnZ = hndfjbpoklf));
|
|
this.allowRotationOnX = (this.allowRotationOnY = (this.allowRotationOnZ = !OIJCKMKEELG));
|
|
this.constrainToSphere = OIJCKMKEELG;
|
|
}
|
|
|
|
// Token: 0x0601697F RID: 92543 RVA: 0x00648AD4 File Offset: 0x00646CD4
|
|
public virtual Vector3 LBPOGAMNFCK()
|
|
{
|
|
Vector3 vector = base.transform.InverseTransformPoint(base.BHGNGIADDDO());
|
|
if (this.allowMovementOnX != (AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)5)
|
|
{
|
|
if (this.allowMovementOnX == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.x = 1626f;
|
|
}
|
|
else
|
|
{
|
|
vector.x = ((this.allowMovementOnX != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(763f, vector.x) : Mathf.Min(1898f, vector.x));
|
|
}
|
|
}
|
|
if (this.allowMovementOnY != (AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)4)
|
|
{
|
|
if (this.allowMovementOnY == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.y = 760f;
|
|
}
|
|
else
|
|
{
|
|
vector.y = ((this.allowMovementOnY != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(379f, vector.y) : Mathf.Min(115f, vector.y));
|
|
}
|
|
}
|
|
if (this.allowMovementOnZ != (AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)8)
|
|
{
|
|
if (this.allowMovementOnZ == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.z = 827f;
|
|
}
|
|
else
|
|
{
|
|
vector.z = ((this.allowMovementOnZ != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(775f, vector.z) : Mathf.Min(1822f, vector.z));
|
|
}
|
|
}
|
|
vector = base.transform.TransformPoint(vector);
|
|
if (this.constrainToSphere)
|
|
{
|
|
Vector3 vector2 = vector - this.sphericalRestrictionCenter;
|
|
if (vector2.sqrMagnitude > this.sphericalRestrictionRadius * this.sphericalRestrictionRadius)
|
|
{
|
|
vector = this.sphericalRestrictionCenter + vector2.normalized * this.sphericalRestrictionRadius;
|
|
}
|
|
}
|
|
return vector;
|
|
}
|
|
|
|
// Token: 0x06016980 RID: 92544 RVA: 0x00648C78 File Offset: 0x00646E78
|
|
public virtual Vector3 JHIBGJCACOG()
|
|
{
|
|
Vector3 vector = base.transform.InverseTransformPoint(base.GCEBPCBHJJL());
|
|
if (this.allowMovementOnX != (AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)6)
|
|
{
|
|
if (this.allowMovementOnX == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.x = 606f;
|
|
}
|
|
else
|
|
{
|
|
vector.x = ((this.allowMovementOnX != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(937f, vector.x) : Mathf.Min(1855f, vector.x));
|
|
}
|
|
}
|
|
if (this.allowMovementOnY != (AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)3)
|
|
{
|
|
if (this.allowMovementOnY == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.y = 1712f;
|
|
}
|
|
else
|
|
{
|
|
vector.y = ((this.allowMovementOnY != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(1672f, vector.y) : Mathf.Min(1631f, vector.y));
|
|
}
|
|
}
|
|
if (this.allowMovementOnZ != (AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)7)
|
|
{
|
|
if (this.allowMovementOnZ == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.z = 1320f;
|
|
}
|
|
else
|
|
{
|
|
vector.z = ((this.allowMovementOnZ != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(1330f, vector.z) : Mathf.Min(1542f, vector.z));
|
|
}
|
|
}
|
|
vector = base.transform.TransformPoint(vector);
|
|
if (this.constrainToSphere)
|
|
{
|
|
Vector3 vector2 = vector - this.sphericalRestrictionCenter;
|
|
if (vector2.sqrMagnitude > this.sphericalRestrictionRadius * this.sphericalRestrictionRadius)
|
|
{
|
|
vector = this.sphericalRestrictionCenter + vector2.normalized * this.sphericalRestrictionRadius;
|
|
}
|
|
}
|
|
return vector;
|
|
}
|
|
|
|
// Token: 0x06016981 RID: 92545 RVA: 0x00648E1C File Offset: 0x0064701C
|
|
public virtual Vector3 NJAMLLNKGON()
|
|
{
|
|
Vector3 vector = base.transform.InverseTransformPoint(base.KBBIALIBBPE());
|
|
if (this.allowMovementOnX != (AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)6)
|
|
{
|
|
if (this.allowMovementOnX == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.x = 1318f;
|
|
}
|
|
else
|
|
{
|
|
vector.x = ((this.allowMovementOnX != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(738f, vector.x) : Mathf.Min(1583f, vector.x));
|
|
}
|
|
}
|
|
if (this.allowMovementOnY != (AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)6)
|
|
{
|
|
if (this.allowMovementOnY == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.y = 2f;
|
|
}
|
|
else
|
|
{
|
|
vector.y = ((this.allowMovementOnY != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(314f, vector.y) : Mathf.Min(1244f, vector.y));
|
|
}
|
|
}
|
|
if (this.allowMovementOnZ != (AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)4)
|
|
{
|
|
if (this.allowMovementOnZ == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.z = 1055f;
|
|
}
|
|
else
|
|
{
|
|
vector.z = ((this.allowMovementOnZ != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(394f, vector.z) : Mathf.Min(866f, vector.z));
|
|
}
|
|
}
|
|
vector = base.transform.TransformPoint(vector);
|
|
if (this.constrainToSphere)
|
|
{
|
|
Vector3 vector2 = vector - this.sphericalRestrictionCenter;
|
|
if (vector2.sqrMagnitude > this.sphericalRestrictionRadius * this.sphericalRestrictionRadius)
|
|
{
|
|
vector = this.sphericalRestrictionCenter + vector2.normalized * this.sphericalRestrictionRadius;
|
|
}
|
|
}
|
|
return vector;
|
|
}
|
|
|
|
// Token: 0x06016982 RID: 92546 RVA: 0x00648FC0 File Offset: 0x006471C0
|
|
public virtual Vector3 HIHHOENBMEF()
|
|
{
|
|
Vector3 vector = base.transform.InverseTransformPoint(base.MCACCOBNBML());
|
|
if (this.allowMovementOnX != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Positive)
|
|
{
|
|
if (this.allowMovementOnX == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.x = 1612f;
|
|
}
|
|
else
|
|
{
|
|
vector.x = ((this.allowMovementOnX != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(1159f, vector.x) : Mathf.Min(312f, vector.x));
|
|
}
|
|
}
|
|
if (this.allowMovementOnY != (AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)3)
|
|
{
|
|
if (this.allowMovementOnY == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.y = 1534f;
|
|
}
|
|
else
|
|
{
|
|
vector.y = ((this.allowMovementOnY != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(0f, vector.y) : Mathf.Min(368f, vector.y));
|
|
}
|
|
}
|
|
if (this.allowMovementOnZ != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
if (this.allowMovementOnZ == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.z = 14f;
|
|
}
|
|
else
|
|
{
|
|
vector.z = ((this.allowMovementOnZ != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(1886f, vector.z) : Mathf.Min(547f, vector.z));
|
|
}
|
|
}
|
|
vector = base.transform.TransformPoint(vector);
|
|
if (this.constrainToSphere)
|
|
{
|
|
Vector3 vector2 = vector - this.sphericalRestrictionCenter;
|
|
if (vector2.sqrMagnitude > this.sphericalRestrictionRadius * this.sphericalRestrictionRadius)
|
|
{
|
|
vector = this.sphericalRestrictionCenter + vector2.normalized * this.sphericalRestrictionRadius;
|
|
}
|
|
}
|
|
return vector;
|
|
}
|
|
|
|
// Token: 0x06016983 RID: 92547 RVA: 0x00649164 File Offset: 0x00647364
|
|
public virtual Vector3 MEMHFEPEMIM()
|
|
{
|
|
Vector3 vector = base.transform.InverseTransformPoint(base.DCOAIMPGDBF());
|
|
if (this.allowMovementOnX != (AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)6)
|
|
{
|
|
if (this.allowMovementOnX == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.x = 3f;
|
|
}
|
|
else
|
|
{
|
|
vector.x = ((this.allowMovementOnX != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(95f, vector.x) : Mathf.Min(724f, vector.x));
|
|
}
|
|
}
|
|
if (this.allowMovementOnY != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
if (this.allowMovementOnY == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.y = 65f;
|
|
}
|
|
else
|
|
{
|
|
vector.y = ((this.allowMovementOnY != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(1079f, vector.y) : Mathf.Min(677f, vector.y));
|
|
}
|
|
}
|
|
if (this.allowMovementOnZ != (AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)7)
|
|
{
|
|
if (this.allowMovementOnZ == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.z = 1837f;
|
|
}
|
|
else
|
|
{
|
|
vector.z = ((this.allowMovementOnZ != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(407f, vector.z) : Mathf.Min(895f, vector.z));
|
|
}
|
|
}
|
|
vector = base.transform.TransformPoint(vector);
|
|
if (this.constrainToSphere)
|
|
{
|
|
Vector3 vector2 = vector - this.sphericalRestrictionCenter;
|
|
if (vector2.sqrMagnitude > this.sphericalRestrictionRadius * this.sphericalRestrictionRadius)
|
|
{
|
|
vector = this.sphericalRestrictionCenter + vector2.normalized * this.sphericalRestrictionRadius;
|
|
}
|
|
}
|
|
return vector;
|
|
}
|
|
|
|
// Token: 0x06016984 RID: 92548 RVA: 0x00649308 File Offset: 0x00647508
|
|
public virtual Vector3 JAAGAOBMHGM()
|
|
{
|
|
Vector3 vector = base.transform.InverseTransformPoint(base.MCACCOBNBML());
|
|
if (this.allowMovementOnX != (AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)8)
|
|
{
|
|
if (this.allowMovementOnX == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.x = 911f;
|
|
}
|
|
else
|
|
{
|
|
vector.x = ((this.allowMovementOnX != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(673f, vector.x) : Mathf.Min(1402f, vector.x));
|
|
}
|
|
}
|
|
if (this.allowMovementOnY != (AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)6)
|
|
{
|
|
if (this.allowMovementOnY == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.y = 960f;
|
|
}
|
|
else
|
|
{
|
|
vector.y = ((this.allowMovementOnY != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(1819f, vector.y) : Mathf.Min(591f, vector.y));
|
|
}
|
|
}
|
|
if (this.allowMovementOnZ != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
if (this.allowMovementOnZ == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.z = 408f;
|
|
}
|
|
else
|
|
{
|
|
vector.z = ((this.allowMovementOnZ != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(1084f, vector.z) : Mathf.Min(1091f, vector.z));
|
|
}
|
|
}
|
|
vector = base.transform.TransformPoint(vector);
|
|
if (this.constrainToSphere)
|
|
{
|
|
Vector3 vector2 = vector - this.sphericalRestrictionCenter;
|
|
if (vector2.sqrMagnitude > this.sphericalRestrictionRadius * this.sphericalRestrictionRadius)
|
|
{
|
|
vector = this.sphericalRestrictionCenter + vector2.normalized * this.sphericalRestrictionRadius;
|
|
}
|
|
}
|
|
return vector;
|
|
}
|
|
|
|
// Token: 0x06016986 RID: 92550 RVA: 0x006494E0 File Offset: 0x006476E0
|
|
public void AABHJIJKNNJ(bool OIJCKMKEELG)
|
|
{
|
|
AxisConstrainedRigidbodyPickup.HNDFJBPOKLF hndfjbpoklf = ((!OIJCKMKEELG) ? AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None : AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Positive);
|
|
this.allowMovementOnX = (this.allowMovementOnY = (this.allowMovementOnZ = hndfjbpoklf));
|
|
this.allowRotationOnX = (this.allowRotationOnY = (this.allowRotationOnZ = OIJCKMKEELG));
|
|
this.constrainToSphere = OIJCKMKEELG;
|
|
}
|
|
|
|
// Token: 0x06016987 RID: 92551 RVA: 0x00649538 File Offset: 0x00647738
|
|
public virtual Vector3 OBFEPECKPGH()
|
|
{
|
|
Vector3 vector = base.transform.InverseTransformPoint(base.KBBIALIBBPE());
|
|
if (this.allowMovementOnX != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
if (this.allowMovementOnX == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.x = 467f;
|
|
}
|
|
else
|
|
{
|
|
vector.x = ((this.allowMovementOnX != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(1549f, vector.x) : Mathf.Min(1088f, vector.x));
|
|
}
|
|
}
|
|
if (this.allowMovementOnY != (AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)7)
|
|
{
|
|
if (this.allowMovementOnY == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.y = 1570f;
|
|
}
|
|
else
|
|
{
|
|
vector.y = ((this.allowMovementOnY != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(1940f, vector.y) : Mathf.Min(1687f, vector.y));
|
|
}
|
|
}
|
|
if (this.allowMovementOnZ != (AxisConstrainedRigidbodyPickup.HNDFJBPOKLF)5)
|
|
{
|
|
if (this.allowMovementOnZ == AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None)
|
|
{
|
|
vector.z = 701f;
|
|
}
|
|
else
|
|
{
|
|
vector.z = ((this.allowMovementOnZ != AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.Negative) ? Mathf.Max(1629f, vector.z) : Mathf.Min(1797f, vector.z));
|
|
}
|
|
}
|
|
vector = base.transform.TransformPoint(vector);
|
|
if (this.constrainToSphere)
|
|
{
|
|
Vector3 vector2 = vector - this.sphericalRestrictionCenter;
|
|
if (vector2.sqrMagnitude > this.sphericalRestrictionRadius * this.sphericalRestrictionRadius)
|
|
{
|
|
vector = this.sphericalRestrictionCenter + vector2.normalized * this.sphericalRestrictionRadius;
|
|
}
|
|
}
|
|
return vector;
|
|
}
|
|
|
|
// Token: 0x06016988 RID: 92552 RVA: 0x006496DC File Offset: 0x006478DC
|
|
public void OGEDNNFDMMB(bool OIJCKMKEELG)
|
|
{
|
|
AxisConstrainedRigidbodyPickup.HNDFJBPOKLF hndfjbpoklf = ((!OIJCKMKEELG) ? AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None : AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.None);
|
|
this.allowMovementOnX = (this.allowMovementOnY = (this.allowMovementOnZ = hndfjbpoklf));
|
|
this.allowRotationOnX = (this.allowRotationOnY = (this.allowRotationOnZ = OIJCKMKEELG));
|
|
this.constrainToSphere = OIJCKMKEELG;
|
|
}
|
|
|
|
// Token: 0x06016989 RID: 92553 RVA: 0x00649734 File Offset: 0x00647934
|
|
public virtual Quaternion CAHBBHFBHLN()
|
|
{
|
|
Vector3 eulerAngles = base.transform.MCKNNGGGBDG(base.INMMPMMNFJF).eulerAngles;
|
|
if (!this.allowRotationOnX)
|
|
{
|
|
eulerAngles.x = 1610f;
|
|
}
|
|
if (!this.allowRotationOnY)
|
|
{
|
|
eulerAngles.y = 971f;
|
|
}
|
|
if (!this.allowRotationOnZ)
|
|
{
|
|
eulerAngles.z = 1964f;
|
|
}
|
|
return base.transform.PAFJLHMDIMO(Quaternion.Euler(eulerAngles));
|
|
}
|
|
|
|
// Token: 0x0601698A RID: 92554 RVA: 0x006497B4 File Offset: 0x006479B4
|
|
public virtual Quaternion NMNJGHKFNGM()
|
|
{
|
|
Vector3 eulerAngles = base.transform.MCKNNGGGBDG(base.CAPJFECFOME()).eulerAngles;
|
|
if (!this.allowRotationOnX)
|
|
{
|
|
eulerAngles.x = 1270f;
|
|
}
|
|
if (!this.allowRotationOnY)
|
|
{
|
|
eulerAngles.y = 596f;
|
|
}
|
|
if (!this.allowRotationOnZ)
|
|
{
|
|
eulerAngles.z = 86f;
|
|
}
|
|
return base.transform.PAFJLHMDIMO(Quaternion.Euler(eulerAngles));
|
|
}
|
|
|
|
// Token: 0x04003F23 RID: 16163
|
|
[Header("Movement constraints")]
|
|
public AxisConstrainedRigidbodyPickup.HNDFJBPOKLF allowMovementOnX = AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.All;
|
|
|
|
// Token: 0x04003F24 RID: 16164
|
|
public AxisConstrainedRigidbodyPickup.HNDFJBPOKLF allowMovementOnY = AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.All;
|
|
|
|
// Token: 0x04003F25 RID: 16165
|
|
public AxisConstrainedRigidbodyPickup.HNDFJBPOKLF allowMovementOnZ = AxisConstrainedRigidbodyPickup.HNDFJBPOKLF.All;
|
|
|
|
// Token: 0x04003F26 RID: 16166
|
|
[Header("Rotation constraints")]
|
|
public bool allowRotationOnX = true;
|
|
|
|
// Token: 0x04003F27 RID: 16167
|
|
public bool allowRotationOnY = true;
|
|
|
|
// Token: 0x04003F28 RID: 16168
|
|
public bool allowRotationOnZ = true;
|
|
|
|
// Token: 0x04003F29 RID: 16169
|
|
[Header("Spherical constraints")]
|
|
public bool constrainToSphere;
|
|
|
|
// Token: 0x04003F2A RID: 16170
|
|
public Vector3 sphericalRestrictionCenter;
|
|
|
|
// Token: 0x04003F2B RID: 16171
|
|
public float sphericalRestrictionRadius;
|
|
|
|
// Token: 0x02000BAB RID: 2987
|
|
public enum HNDFJBPOKLF
|
|
{
|
|
// Token: 0x04003F2D RID: 16173
|
|
All = 2,
|
|
// Token: 0x04003F2E RID: 16174
|
|
None = 0,
|
|
// Token: 0x04003F2F RID: 16175
|
|
Positive,
|
|
// Token: 0x04003F30 RID: 16176
|
|
Negative = -1
|
|
}
|
|
}
|