288 lines
7.2 KiB
C#
288 lines
7.2 KiB
C#
using System;
|
|
using RecRoom;
|
|
using UnityEngine;
|
|
|
|
// Token: 0x02001192 RID: 4498
|
|
public abstract class CustomTrail : MonoBehaviour
|
|
{
|
|
// Token: 0x17001176 RID: 4470
|
|
// (get) Token: 0x0602658E RID: 157070
|
|
// (set) Token: 0x0602658F RID: 157071
|
|
public abstract Color GBLPHKFPELB { get; set; }
|
|
|
|
// Token: 0x17001177 RID: 4471
|
|
// (get) Token: 0x06026590 RID: 157072
|
|
// (set) Token: 0x06026591 RID: 157073
|
|
public abstract Vector2 AHBFILJILDK { get; set; }
|
|
|
|
// Token: 0x06026592 RID: 157074
|
|
protected abstract void NILLPAHDECP();
|
|
|
|
// Token: 0x17001178 RID: 4472
|
|
// (get) Token: 0x06026593 RID: 157075 RVA: 0x00AA123C File Offset: 0x00A9F43C
|
|
// (set) Token: 0x06026594 RID: 157076 RVA: 0x00AA1244 File Offset: 0x00A9F444
|
|
public float LMPDCNKJMEO { get; set; }
|
|
|
|
// Token: 0x17001179 RID: 4473
|
|
// (get) Token: 0x06026595 RID: 157077 RVA: 0x00AA1250 File Offset: 0x00A9F450
|
|
public bool EIAJODBNFHD
|
|
{
|
|
get
|
|
{
|
|
return this.MGPEFLCCKBB.NKEHDKABAPE > 0;
|
|
}
|
|
}
|
|
|
|
// Token: 0x1700117A RID: 4474
|
|
// (get) Token: 0x06026596 RID: 157078 RVA: 0x00AA1260 File Offset: 0x00A9F460
|
|
public float OJKKOEJCCLC
|
|
{
|
|
get
|
|
{
|
|
if (this.BIFGNGLNPMB)
|
|
{
|
|
float num = 0f;
|
|
using (HHDHGEHNHKA<float>.Enumerator enumerator = this.GAKHEHLOOPD.HNBFJBKFBCB())
|
|
{
|
|
while (enumerator.MoveNext())
|
|
{
|
|
float num2 = enumerator.Current;
|
|
num += num2;
|
|
}
|
|
}
|
|
return num;
|
|
}
|
|
throw new InvalidOperationException(string.Format("Custom trail type {0} does not support tracking trail length.", base.GetType()));
|
|
}
|
|
}
|
|
|
|
// Token: 0x1700117B RID: 4475
|
|
// (get) Token: 0x06026597 RID: 157079 RVA: 0x00AA12E4 File Offset: 0x00A9F4E4
|
|
protected virtual bool BIFGNGLNPMB
|
|
{
|
|
get
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
// Token: 0x1700117C RID: 4476
|
|
// (set) Token: 0x06026598 RID: 157080 RVA: 0x00AA12E8 File Offset: 0x00A9F4E8
|
|
protected virtual bool FBEPNJCGHMA
|
|
{
|
|
set
|
|
{
|
|
if (this.startCap != null)
|
|
{
|
|
this.startCap.enabled = value;
|
|
}
|
|
if (this.endCap != null)
|
|
{
|
|
this.endCap.enabled = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06026599 RID: 157081 RVA: 0x00AA1324 File Offset: 0x00A9F524
|
|
public virtual void Clear()
|
|
{
|
|
this.DLJMCGAFDDJ.NFGBPFHKLGF();
|
|
this.MGPEFLCCKBB.NFGBPFHKLGF();
|
|
this.NGLNMAKHKAP.NFGBPFHKLGF();
|
|
if (this.GAKHEHLOOPD != null)
|
|
{
|
|
this.GAKHEHLOOPD.NFGBPFHKLGF();
|
|
}
|
|
this.HFINIDKDEOI = true;
|
|
this.IGOKAHEIMJK();
|
|
}
|
|
|
|
// Token: 0x0602659A RID: 157082 RVA: 0x00AA1378 File Offset: 0x00A9F578
|
|
protected virtual void Awake()
|
|
{
|
|
this.LMPDCNKJMEO = this.lifetime;
|
|
if (this.BIFGNGLNPMB)
|
|
{
|
|
this.GAKHEHLOOPD = new HHDHGEHNHKA<float>(128);
|
|
}
|
|
CustomTrail.HPEHKBGJLHL = Shader.PropertyToID("_TintColor");
|
|
this.HFIJIICIDDE = this.minSpacing * this.minSpacing;
|
|
if (this.materials == null || this.materials.Length == 0)
|
|
{
|
|
Debug.LogError("Trail on " + base.gameObject.name + " is missing materials.");
|
|
return;
|
|
}
|
|
this.AHBFILJILDK = this.widths;
|
|
this.GBLPHKFPELB = Color.white;
|
|
}
|
|
|
|
// Token: 0x0602659B RID: 157083 RVA: 0x00AA1420 File Offset: 0x00A9F620
|
|
protected virtual void OnEnable()
|
|
{
|
|
this.FBEPNJCGHMA = true;
|
|
this.Clear();
|
|
}
|
|
|
|
// Token: 0x0602659C RID: 157084 RVA: 0x00AA1430 File Offset: 0x00A9F630
|
|
protected virtual void OnDisable()
|
|
{
|
|
this.FBEPNJCGHMA = false;
|
|
this.Clear();
|
|
}
|
|
|
|
// Token: 0x0602659D RID: 157085 RVA: 0x00AA1440 File Offset: 0x00A9F640
|
|
protected virtual void Update()
|
|
{
|
|
this.IGOKAHEIMJK();
|
|
}
|
|
|
|
// Token: 0x0602659E RID: 157086 RVA: 0x00AA1448 File Offset: 0x00A9F648
|
|
protected void IGOKAHEIMJK()
|
|
{
|
|
float num = Time.time - this.LMPDCNKJMEO;
|
|
int num2 = 0;
|
|
while (num2 < this.DLJMCGAFDDJ.NKEHDKABAPE && this.DLJMCGAFDDJ.KLODCNIFGAP(num2) <= num)
|
|
{
|
|
num2++;
|
|
}
|
|
if (num2 > 0)
|
|
{
|
|
this.DLJMCGAFDDJ.GACDMHKJIAL(num2);
|
|
this.MGPEFLCCKBB.GACDMHKJIAL(num2);
|
|
this.NGLNMAKHKAP.GACDMHKJIAL(num2);
|
|
if (this.BIFGNGLNPMB)
|
|
{
|
|
this.GAKHEHLOOPD.GACDMHKJIAL(num2);
|
|
if (this.GAKHEHLOOPD.NKEHDKABAPE > 0)
|
|
{
|
|
this.GAKHEHLOOPD.BGADAOBIPNH(0, 0f);
|
|
}
|
|
}
|
|
this.HFINIDKDEOI = true;
|
|
}
|
|
if (this.HFINIDKDEOI)
|
|
{
|
|
this.NILLPAHDECP();
|
|
this.HFINIDKDEOI = false;
|
|
}
|
|
if (this.MGPEFLCCKBB.NKEHDKABAPE < 2)
|
|
{
|
|
this.FBEPNJCGHMA = false;
|
|
}
|
|
else if (this.MGPEFLCCKBB.NKEHDKABAPE > 1)
|
|
{
|
|
if (this.displayStartCap && this.startCap != null)
|
|
{
|
|
this.startCap.transform.position = this.MGPEFLCCKBB.KLODCNIFGAP(0);
|
|
Vector3 normalized = (this.MGPEFLCCKBB.KLODCNIFGAP(0) - this.MGPEFLCCKBB.KLODCNIFGAP(1)).normalized;
|
|
this.startCap.transform.rotation = Quaternion.LookRotation(normalized);
|
|
}
|
|
if (this.displayEndCap && this.endCap != null)
|
|
{
|
|
int num3 = this.MGPEFLCCKBB.NKEHDKABAPE;
|
|
this.endCap.transform.position = this.MGPEFLCCKBB.KLODCNIFGAP(num3 - 1);
|
|
Vector3 normalized2 = (this.MGPEFLCCKBB.KLODCNIFGAP(num3 - 2) - this.MGPEFLCCKBB.KLODCNIFGAP(num3 - 1)).normalized;
|
|
this.endCap.transform.rotation = Quaternion.LookRotation(normalized2);
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x0602659F RID: 157087 RVA: 0x00AA1644 File Offset: 0x00A9F844
|
|
protected virtual void KKIOLLPNFLF(Vector3 EHEDIEMODME, Vector3 AHGBPEBCMHE, float FHMJPEIDANE)
|
|
{
|
|
if (this.BIFGNGLNPMB)
|
|
{
|
|
if (this.MGPEFLCCKBB.NKEHDKABAPE > 0)
|
|
{
|
|
this.GAKHEHLOOPD.OPJKMCEACMD((EHEDIEMODME - this.MGPEFLCCKBB.KLODCNIFGAP(this.MGPEFLCCKBB.NKEHDKABAPE - 1)).magnitude);
|
|
}
|
|
else
|
|
{
|
|
this.GAKHEHLOOPD.OPJKMCEACMD(0f);
|
|
}
|
|
}
|
|
this.MGPEFLCCKBB.OPJKMCEACMD(EHEDIEMODME);
|
|
this.NGLNMAKHKAP.OPJKMCEACMD(AHGBPEBCMHE);
|
|
this.DLJMCGAFDDJ.OPJKMCEACMD(FHMJPEIDANE);
|
|
this.HFINIDKDEOI = true;
|
|
this.FBEPNJCGHMA = true;
|
|
}
|
|
|
|
// Token: 0x040060AD RID: 24749
|
|
protected const int KLPEBCBLDJI = 128;
|
|
|
|
// Token: 0x040060AE RID: 24750
|
|
[SerializeField]
|
|
[Header("Visuals")]
|
|
protected Material[] materials;
|
|
|
|
// Token: 0x040060AF RID: 24751
|
|
[SerializeField]
|
|
protected bool castShadows;
|
|
|
|
// Token: 0x040060B0 RID: 24752
|
|
[SerializeField]
|
|
protected bool receiveShadows;
|
|
|
|
// Token: 0x040060B1 RID: 24753
|
|
[SerializeField]
|
|
[Header("Layout")]
|
|
protected float lifetime = 5f;
|
|
|
|
// Token: 0x040060B2 RID: 24754
|
|
[SerializeField]
|
|
protected Vector2 alphas = new Vector2(0f, 1f);
|
|
|
|
// Token: 0x040060B3 RID: 24755
|
|
[SerializeField]
|
|
protected Vector2 widths = new Vector2(0.2f, 0.8f);
|
|
|
|
// Token: 0x040060B4 RID: 24756
|
|
[SerializeField]
|
|
protected float minSpacing = 0.01f;
|
|
|
|
// Token: 0x040060B5 RID: 24757
|
|
[SerializeField]
|
|
[Header("End Caps")]
|
|
protected bool displayStartCap;
|
|
|
|
// Token: 0x040060B6 RID: 24758
|
|
[SerializeField]
|
|
protected Renderer startCap;
|
|
|
|
// Token: 0x040060B7 RID: 24759
|
|
[SerializeField]
|
|
protected bool displayEndCap;
|
|
|
|
// Token: 0x040060B8 RID: 24760
|
|
[SerializeField]
|
|
protected Renderer endCap;
|
|
|
|
// Token: 0x040060B9 RID: 24761
|
|
protected static int HPEHKBGJLHL = -1;
|
|
|
|
// Token: 0x040060BA RID: 24762
|
|
protected float LLMONOACHDK = 1f;
|
|
|
|
// Token: 0x040060BB RID: 24763
|
|
protected float DICAHHMPPIG = 1f;
|
|
|
|
// Token: 0x040060BC RID: 24764
|
|
protected float HFIJIICIDDE;
|
|
|
|
// Token: 0x040060BD RID: 24765
|
|
protected bool HFINIDKDEOI = true;
|
|
|
|
// Token: 0x040060BE RID: 24766
|
|
protected HHDHGEHNHKA<float> DLJMCGAFDDJ = new HHDHGEHNHKA<float>(128);
|
|
|
|
// Token: 0x040060BF RID: 24767
|
|
protected HHDHGEHNHKA<Vector3> MGPEFLCCKBB = new HHDHGEHNHKA<Vector3>(128);
|
|
|
|
// Token: 0x040060C0 RID: 24768
|
|
protected HHDHGEHNHKA<Vector3> NGLNMAKHKAP = new HHDHGEHNHKA<Vector3>(128);
|
|
|
|
// Token: 0x040060C1 RID: 24769
|
|
protected HHDHGEHNHKA<float> GAKHEHLOOPD;
|
|
}
|