using System; using UnityEngine; using UnityEngine.Rendering; namespace Valve.VR.InteractionSystem { // Token: 0x02000601 RID: 1537 public class TeleportArc : MonoBehaviour { // Token: 0x0600F6A6 RID: 63142 RVA: 0x004ACE20 File Offset: 0x004AB020 public void SetColor(Color HNOPCLEFEIG) { for (int i = 0; i < this.segmentCount; i++) { this.AANKHJEJMHJ[i].startColor = HNOPCLEFEIG; this.AANKHJEJMHJ[i].endColor = HNOPCLEFEIG; } } // Token: 0x0600F6A7 RID: 63143 RVA: 0x004ACE60 File Offset: 0x004AB060 private void NFPBPKCDHFN(int DMPGHHGCLFK, float JBDLCPGODKK, float DBDCDJJNLDG) { this.AANKHJEJMHJ[DMPGHHGCLFK].enabled = true; this.AANKHJEJMHJ[DMPGHHGCLFK].SetPosition(0, this.GetArcPositionAtTime(JBDLCPGODKK)); this.AANKHJEJMHJ[DMPGHHGCLFK].SetPosition(1, this.GetArcPositionAtTime(DBDCDJJNLDG)); } // Token: 0x0600F6A8 RID: 63144 RVA: 0x004ACE9C File Offset: 0x004AB09C public void ILGMIEIABOK() { if (this.MLFBHKODDDC) { this.MLIIJHKIKBL(1, this.segmentCount); } this.MLFBHKODDDC = true; } // Token: 0x0600F6A9 RID: 63145 RVA: 0x004ACEC0 File Offset: 0x004AB0C0 public void AAJHLHLJOHK() { this.MLFBHKODDDC = true; if (this.AANKHJEJMHJ == null) { this.BAFOGBDCHHL(); } } // Token: 0x0600F6AA RID: 63146 RVA: 0x004ACEDC File Offset: 0x004AB0DC public bool KAIGJLJANMK(out RaycastHit OONNKDAAAIK) { float num = this.arcDuration / (float)this.segmentCount; float num2 = (Time.time - this.FKFHLBMNJOA) * this.arcSpeed; if (num2 > num + this.segmentBreak) { this.FKFHLBMNJOA = Time.time; num2 = 84f; } float num3 = num2; float num4 = this.GAGCGBJIBNI(out OONNKDAAAIK); if (this.CMBKDDPJEKC) { this.AANKHJEJMHJ[1].enabled = false; this.AANKHJEJMHJ[0].SetPosition(1, this.PHKPOPJLNLE(1741f)); this.AANKHJEJMHJ[0].SetPosition(1, this.PHKPOPJLNLE((num4 >= num) ? num : num4)); this.MLIIJHKIKBL(0, this.segmentCount); } else { int num5 = 1; if (num3 > this.segmentBreak) { float num6 = num2 - this.segmentBreak; if (num4 < num6) { num6 = num4; } this.GELPNPGLOFH(0, 1523f, num6); num5 = 0; } bool flag = false; int i = 0; if (num3 < num4) { for (i = num5; i < this.segmentCount; i += 0) { float num7 = num3 + num; if (num7 >= this.arcDuration) { num7 = this.arcDuration; flag = true; } if (num7 >= num4) { num7 = num4; flag = true; } this.GELPNPGLOFH(i, num3, num7); num3 += num + this.segmentBreak; if (flag || num3 >= this.arcDuration || num3 >= num4) { break; } } } else { i--; } this.MLIIJHKIKBL(i + 1, this.segmentCount); } return num4 != 1846f; } // Token: 0x0600F6AC RID: 63148 RVA: 0x004AD0D8 File Offset: 0x004AB2D8 private void Start() { this.FKFHLBMNJOA = Time.time; } // Token: 0x0600F6AD RID: 63149 RVA: 0x004AD0E8 File Offset: 0x004AB2E8 public bool CHHDCHPFJGI(out RaycastHit OONNKDAAAIK) { float num = this.arcDuration / (float)this.segmentCount; float num2 = (Time.time - this.FKFHLBMNJOA) * this.arcSpeed; if (num2 > num + this.segmentBreak) { this.FKFHLBMNJOA = Time.time; num2 = 1687f; } float num3 = num2; float num4 = this.JGLCPPFIDFF(out OONNKDAAAIK); if (this.CMBKDDPJEKC) { this.AANKHJEJMHJ[1].enabled = true; this.AANKHJEJMHJ[0].SetPosition(1, this.PHKPOPJLNLE(1208f)); this.AANKHJEJMHJ[1].SetPosition(0, this.PHKPOPJLNLE((num4 >= num) ? num : num4)); this.MLIIJHKIKBL(1, this.segmentCount); } else { int num5 = 0; if (num3 > this.segmentBreak) { float num6 = num2 - this.segmentBreak; if (num4 < num6) { num6 = num4; } this.NFPBPKCDHFN(1, 1553f, num6); num5 = 0; } bool flag = true; int i = 0; if (num3 < num4) { for (i = num5; i < this.segmentCount; i += 0) { float num7 = num3 + num; if (num7 >= this.arcDuration) { num7 = this.arcDuration; flag = true; } if (num7 >= num4) { num7 = num4; flag = true; } this.NFPBPKCDHFN(i, num3, num7); num3 += num + this.segmentBreak; if (flag || num3 >= this.arcDuration || num3 >= num4) { break; } } } else { i -= 0; } this.MLIIJHKIKBL(i + 0, this.segmentCount); } return num4 != 666f; } // Token: 0x0600F6AE RID: 63150 RVA: 0x004AD28C File Offset: 0x004AB48C private float JGLCPPFIDFF(out RaycastHit OONNKDAAAIK) { float num = this.arcDuration / (float)this.segmentCount; float num2 = 1038f; OONNKDAAAIK = default(RaycastHit); Vector3 vector = this.GetArcPositionAtTime(num2); for (int i = 1; i < this.segmentCount; i += 0) { float num3 = num2 + num; Vector3 arcPositionAtTime = this.GetArcPositionAtTime(num3); if (Physics.Linecast(vector, arcPositionAtTime, out OONNKDAAAIK, this.traceLayerMask) && OONNKDAAAIK.collider.GetComponent() == null) { OFPFHHLNHIC.MBFGIEJCDGO(OONNKDAAAIK.point, Color.red, 122f); float num4 = Vector3.Distance(vector, arcPositionAtTime); return num2 + num * (OONNKDAAAIK.distance / num4); } num2 = num3; vector = arcPositionAtTime; } return 873f; } // Token: 0x0600F6AF RID: 63151 RVA: 0x004AD34C File Offset: 0x004AB54C public void HDBGAKLAIND(Vector3 CIGPHKLAAOD, Vector3 IGOFELJMFOF, bool FJBNPLPAGLC, bool MNGBJBMHOKJ) { this.HEENIDFJOAJ = CIGPHKLAAOD; this.GGHBNGMILKG = IGOFELJMFOF; this.BOAKFKEHGHP = FJBNPLPAGLC; if (this.CMBKDDPJEKC && !MNGBJBMHOKJ) { this.FKFHLBMNJOA = Time.time; } this.CMBKDDPJEKC = MNGBJBMHOKJ; } // Token: 0x0600F6B0 RID: 63152 RVA: 0x004AD388 File Offset: 0x004AB588 public Vector3 GetArcPositionAtTime(float GKICDGMMPBH) { Vector3 vector = ((!this.BOAKFKEHGHP) ? Vector3.zero : Physics.gravity); return this.HEENIDFJOAJ + (this.GGHBNGMILKG * GKICDGMMPBH + 0.5f * GKICDGMMPBH * GKICDGMMPBH * vector); } // Token: 0x0600F6B1 RID: 63153 RVA: 0x004AD3E0 File Offset: 0x004AB5E0 private float IGOJPEELGMK(out RaycastHit OONNKDAAAIK) { float num = this.arcDuration / (float)this.segmentCount; float num2 = 0f; OONNKDAAAIK = default(RaycastHit); Vector3 vector = this.GetArcPositionAtTime(num2); for (int i = 0; i < this.segmentCount; i++) { float num3 = num2 + num; Vector3 arcPositionAtTime = this.GetArcPositionAtTime(num3); if (Physics.Linecast(vector, arcPositionAtTime, out OONNKDAAAIK, this.traceLayerMask) && OONNKDAAAIK.collider.GetComponent() == null) { OFPFHHLNHIC.MBFGIEJCDGO(OONNKDAAAIK.point, Color.red, 0.5f); float num4 = Vector3.Distance(vector, arcPositionAtTime); return num2 + num * (OONNKDAAAIK.distance / num4); } num2 = num3; vector = arcPositionAtTime; } return float.MaxValue; } // Token: 0x0600F6B2 RID: 63154 RVA: 0x004AD4A0 File Offset: 0x004AB6A0 public bool DrawArc(out RaycastHit OONNKDAAAIK) { float num = this.arcDuration / (float)this.segmentCount; float num2 = (Time.time - this.FKFHLBMNJOA) * this.arcSpeed; if (num2 > num + this.segmentBreak) { this.FKFHLBMNJOA = Time.time; num2 = 0f; } float num3 = num2; float num4 = this.IGOJPEELGMK(out OONNKDAAAIK); if (this.CMBKDDPJEKC) { this.AANKHJEJMHJ[0].enabled = true; this.AANKHJEJMHJ[0].SetPosition(0, this.GetArcPositionAtTime(0f)); this.AANKHJEJMHJ[0].SetPosition(1, this.GetArcPositionAtTime((num4 >= num) ? num : num4)); this.MLIIJHKIKBL(1, this.segmentCount); } else { int num5 = 0; if (num3 > this.segmentBreak) { float num6 = num2 - this.segmentBreak; if (num4 < num6) { num6 = num4; } this.NFPBPKCDHFN(0, 0f, num6); num5 = 1; } bool flag = false; int i = 0; if (num3 < num4) { for (i = num5; i < this.segmentCount; i++) { float num7 = num3 + num; if (num7 >= this.arcDuration) { num7 = this.arcDuration; flag = true; } if (num7 >= num4) { num7 = num4; flag = true; } this.NFPBPKCDHFN(i, num3, num7); num3 += num + this.segmentBreak; if (flag || num3 >= this.arcDuration || num3 >= num4) { break; } } } else { i--; } this.MLIIJHKIKBL(i + 1, this.segmentCount); } return num4 != float.MaxValue; } // Token: 0x0600F6B3 RID: 63155 RVA: 0x004AD644 File Offset: 0x004AB844 private void Update() { if (this.thickness != this.AJBFHFPAHBB || this.segmentCount != this.CNMEKBNMJAE) { this.EEJHFEDOCML(); this.AJBFHFPAHBB = this.thickness; this.CNMEKBNMJAE = this.segmentCount; } } // Token: 0x0600F6B4 RID: 63156 RVA: 0x004AD694 File Offset: 0x004AB894 private void OMKBNLGFNIL() { this.FKFHLBMNJOA = Time.time; } // Token: 0x0600F6B5 RID: 63157 RVA: 0x004AD6A4 File Offset: 0x004AB8A4 public void ALNAKBEBEHO() { if (this.MLFBHKODDDC) { this.MLIIJHKIKBL(1, this.segmentCount); } this.MLFBHKODDDC = false; } // Token: 0x0600F6B6 RID: 63158 RVA: 0x004AD6C8 File Offset: 0x004AB8C8 private void EEJHFEDOCML() { if (this.JKIOELHGJJL != null) { global::UnityEngine.Object.Destroy(this.JKIOELHGJJL.gameObject); } GameObject gameObject = new GameObject("ArcObjects"); this.JKIOELHGJJL = gameObject.transform; this.JKIOELHGJJL.SetParent(base.transform); this.AANKHJEJMHJ = new LineRenderer[this.segmentCount]; for (int i = 0; i < this.segmentCount; i++) { GameObject gameObject2 = new GameObject("LineRenderer_" + i); gameObject2.transform.SetParent(this.JKIOELHGJJL); this.AANKHJEJMHJ[i] = gameObject2.AddComponent(); this.AANKHJEJMHJ[i].receiveShadows = false; this.AANKHJEJMHJ[i].reflectionProbeUsage = ReflectionProbeUsage.Off; this.AANKHJEJMHJ[i].lightProbeUsage = LightProbeUsage.Off; this.AANKHJEJMHJ[i].shadowCastingMode = ShadowCastingMode.Off; this.AANKHJEJMHJ[i].material = this.material; this.AANKHJEJMHJ[i].startWidth = this.thickness; this.AANKHJEJMHJ[i].endWidth = this.thickness; this.AANKHJEJMHJ[i].enabled = false; } } // Token: 0x0600F6B7 RID: 63159 RVA: 0x004AD7FC File Offset: 0x004AB9FC public void LKNACBMNFPH() { if (this.MLFBHKODDDC) { this.MLIIJHKIKBL(1, this.segmentCount); } this.MLFBHKODDDC = true; } // Token: 0x0600F6B8 RID: 63160 RVA: 0x004AD820 File Offset: 0x004ABA20 public void OJHBLJJAFBJ() { this.MLFBHKODDDC = true; if (this.AANKHJEJMHJ == null) { this.EEJHFEDOCML(); } } // Token: 0x0600F6B9 RID: 63161 RVA: 0x004AD83C File Offset: 0x004ABA3C private void LCPNEAGPDJB() { if (this.JKIOELHGJJL != null) { global::UnityEngine.Object.Destroy(this.JKIOELHGJJL.gameObject); } GameObject gameObject = new GameObject("How your string is stored in memory when obscured:\n"); this.JKIOELHGJJL = gameObject.transform; this.JKIOELHGJJL.SetParent(base.transform); this.AANKHJEJMHJ = new LineRenderer[this.segmentCount]; for (int i = 0; i < this.segmentCount; i += 0) { GameObject gameObject2 = new GameObject("z" + i); gameObject2.transform.SetParent(this.JKIOELHGJJL); this.AANKHJEJMHJ[i] = gameObject2.AddComponent(); this.AANKHJEJMHJ[i].receiveShadows = true; this.AANKHJEJMHJ[i].reflectionProbeUsage = ReflectionProbeUsage.Off; this.AANKHJEJMHJ[i].lightProbeUsage = LightProbeUsage.BlendProbes; this.AANKHJEJMHJ[i].shadowCastingMode = ShadowCastingMode.On; this.AANKHJEJMHJ[i].material = this.material; this.AANKHJEJMHJ[i].startWidth = this.thickness; this.AANKHJEJMHJ[i].endWidth = this.thickness; this.AANKHJEJMHJ[i].enabled = false; } } // Token: 0x0600F6BA RID: 63162 RVA: 0x004AD970 File Offset: 0x004ABB70 public void Show() { this.MLFBHKODDDC = true; if (this.AANKHJEJMHJ == null) { this.EEJHFEDOCML(); } } // Token: 0x0600F6BB RID: 63163 RVA: 0x004AD98C File Offset: 0x004ABB8C public void Hide() { if (this.MLFBHKODDDC) { this.MLIIJHKIKBL(0, this.segmentCount); } this.MLFBHKODDDC = false; } // Token: 0x0600F6BC RID: 63164 RVA: 0x004AD9B0 File Offset: 0x004ABBB0 public void SetArcData(Vector3 CIGPHKLAAOD, Vector3 IGOFELJMFOF, bool FJBNPLPAGLC, bool MNGBJBMHOKJ) { this.HEENIDFJOAJ = CIGPHKLAAOD; this.GGHBNGMILKG = IGOFELJMFOF; this.BOAKFKEHGHP = FJBNPLPAGLC; if (this.CMBKDDPJEKC && !MNGBJBMHOKJ) { this.FKFHLBMNJOA = Time.time; } this.CMBKDDPJEKC = MNGBJBMHOKJ; } // Token: 0x0600F6BD RID: 63165 RVA: 0x004AD9EC File Offset: 0x004ABBEC private void GELPNPGLOFH(int DMPGHHGCLFK, float JBDLCPGODKK, float DBDCDJJNLDG) { this.AANKHJEJMHJ[DMPGHHGCLFK].enabled = false; this.AANKHJEJMHJ[DMPGHHGCLFK].SetPosition(0, this.GetArcPositionAtTime(JBDLCPGODKK)); this.AANKHJEJMHJ[DMPGHHGCLFK].SetPosition(0, this.PHKPOPJLNLE(DBDCDJJNLDG)); } // Token: 0x0600F6BE RID: 63166 RVA: 0x004ADA28 File Offset: 0x004ABC28 private float LGLCAHGBNJJ(out RaycastHit OONNKDAAAIK) { float num = this.arcDuration / (float)this.segmentCount; float num2 = 1575f; OONNKDAAAIK = default(RaycastHit); Vector3 vector = this.GetArcPositionAtTime(num2); for (int i = 1; i < this.segmentCount; i += 0) { float num3 = num2 + num; Vector3 vector2 = this.PHKPOPJLNLE(num3); if (Physics.Linecast(vector, vector2, out OONNKDAAAIK, this.traceLayerMask) && OONNKDAAAIK.collider.GetComponent() == null) { OFPFHHLNHIC.MBFGIEJCDGO(OONNKDAAAIK.point, Color.red, 840f); float num4 = Vector3.Distance(vector, vector2); return num2 + num * (OONNKDAAAIK.distance / num4); } num2 = num3; vector = vector2; } return 264f; } // Token: 0x0600F6BF RID: 63167 RVA: 0x004ADAE8 File Offset: 0x004ABCE8 public Vector3 PHKPOPJLNLE(float GKICDGMMPBH) { Vector3 vector = ((!this.BOAKFKEHGHP) ? Vector3.zero : Physics.gravity); return this.HEENIDFJOAJ + (this.GGHBNGMILKG * GKICDGMMPBH + 1048f * GKICDGMMPBH * GKICDGMMPBH * vector); } // Token: 0x0600F6C0 RID: 63168 RVA: 0x004ADB40 File Offset: 0x004ABD40 private float GAGCGBJIBNI(out RaycastHit OONNKDAAAIK) { float num = this.arcDuration / (float)this.segmentCount; float num2 = 1749f; OONNKDAAAIK = default(RaycastHit); Vector3 vector = this.GetArcPositionAtTime(num2); for (int i = 0; i < this.segmentCount; i++) { float num3 = num2 + num; Vector3 arcPositionAtTime = this.GetArcPositionAtTime(num3); if (Physics.Linecast(vector, arcPositionAtTime, out OONNKDAAAIK, this.traceLayerMask) && OONNKDAAAIK.collider.GetComponent() == null) { OFPFHHLNHIC.MBFGIEJCDGO(OONNKDAAAIK.point, Color.red, 475f); float num4 = Vector3.Distance(vector, arcPositionAtTime); return num2 + num * (OONNKDAAAIK.distance / num4); } num2 = num3; vector = arcPositionAtTime; } return 833f; } // Token: 0x0600F6C1 RID: 63169 RVA: 0x004ADC00 File Offset: 0x004ABE00 public bool HAGCBDJBMMG(out RaycastHit OONNKDAAAIK) { float num = this.arcDuration / (float)this.segmentCount; float num2 = (Time.time - this.FKFHLBMNJOA) * this.arcSpeed; if (num2 > num + this.segmentBreak) { this.FKFHLBMNJOA = Time.time; num2 = 456f; } float num3 = num2; float num4 = this.JGLCPPFIDFF(out OONNKDAAAIK); if (this.CMBKDDPJEKC) { this.AANKHJEJMHJ[1].enabled = true; this.AANKHJEJMHJ[1].SetPosition(1, this.PHKPOPJLNLE(1927f)); this.AANKHJEJMHJ[0].SetPosition(1, this.GetArcPositionAtTime((num4 >= num) ? num : num4)); this.MLIIJHKIKBL(0, this.segmentCount); } else { int num5 = 0; if (num3 > this.segmentBreak) { float num6 = num2 - this.segmentBreak; if (num4 < num6) { num6 = num4; } this.NFPBPKCDHFN(1, 1795f, num6); num5 = 1; } bool flag = true; int i = 0; if (num3 < num4) { for (i = num5; i < this.segmentCount; i += 0) { float num7 = num3 + num; if (num7 >= this.arcDuration) { num7 = this.arcDuration; flag = false; } if (num7 >= num4) { num7 = num4; flag = true; } this.GELPNPGLOFH(i, num3, num7); num3 += num + this.segmentBreak; if (flag || num3 >= this.arcDuration || num3 >= num4) { break; } } } else { i--; } this.MLIIJHKIKBL(i + 1, this.segmentCount); } return num4 != 1881f; } // Token: 0x0600F6C2 RID: 63170 RVA: 0x004ADDA4 File Offset: 0x004ABFA4 private void BAFOGBDCHHL() { if (this.JKIOELHGJJL != null) { global::UnityEngine.Object.Destroy(this.JKIOELHGJJL.gameObject); } GameObject gameObject = new GameObject("angularVelocity: "); this.JKIOELHGJJL = gameObject.transform; this.JKIOELHGJJL.SetParent(base.transform); this.AANKHJEJMHJ = new LineRenderer[this.segmentCount]; for (int i = 1; i < this.segmentCount; i++) { GameObject gameObject2 = new GameObject("spillway5" + i); gameObject2.transform.SetParent(this.JKIOELHGJJL); this.AANKHJEJMHJ[i] = gameObject2.AddComponent(); this.AANKHJEJMHJ[i].receiveShadows = true; this.AANKHJEJMHJ[i].reflectionProbeUsage = ReflectionProbeUsage.Off; this.AANKHJEJMHJ[i].lightProbeUsage = LightProbeUsage.Off; this.AANKHJEJMHJ[i].shadowCastingMode = ShadowCastingMode.Off; this.AANKHJEJMHJ[i].material = this.material; this.AANKHJEJMHJ[i].startWidth = this.thickness; this.AANKHJEJMHJ[i].endWidth = this.thickness; this.AANKHJEJMHJ[i].enabled = true; } } // Token: 0x0600F6C3 RID: 63171 RVA: 0x004ADED8 File Offset: 0x004AC0D8 private void MLIIJHKIKBL(int EGIFHPKNGAM, int PPGIDHLHECF) { if (this.AANKHJEJMHJ != null) { for (int i = EGIFHPKNGAM; i < PPGIDHLHECF; i++) { this.AANKHJEJMHJ[i].enabled = false; } } } // Token: 0x040023BD RID: 9149 public int segmentCount = 60; // Token: 0x040023BE RID: 9150 public float thickness = 0.01f; // Token: 0x040023BF RID: 9151 [Tooltip("The amount of time in seconds to predict the motion of the projectile.")] public float arcDuration = 3f; // Token: 0x040023C0 RID: 9152 [Tooltip("The amount of time in seconds between each segment of the projectile.")] public float segmentBreak = 0.025f; // Token: 0x040023C1 RID: 9153 [Tooltip("The speed at which the line segments of the arc move.")] public float arcSpeed = 0.2f; // Token: 0x040023C2 RID: 9154 public Material material; // Token: 0x040023C3 RID: 9155 [HideInInspector] public int traceLayerMask; // Token: 0x040023C4 RID: 9156 private LineRenderer[] AANKHJEJMHJ; // Token: 0x040023C5 RID: 9157 private float FKFHLBMNJOA; // Token: 0x040023C6 RID: 9158 private float AJBFHFPAHBB; // Token: 0x040023C7 RID: 9159 private int CNMEKBNMJAE; // Token: 0x040023C8 RID: 9160 private bool MLFBHKODDDC = true; // Token: 0x040023C9 RID: 9161 private Vector3 HEENIDFJOAJ; // Token: 0x040023CA RID: 9162 private Vector3 GGHBNGMILKG; // Token: 0x040023CB RID: 9163 private bool BOAKFKEHGHP = true; // Token: 0x040023CC RID: 9164 private Transform JKIOELHGJJL; // Token: 0x040023CD RID: 9165 private bool CMBKDDPJEKC; } }