910 lines
27 KiB
C#
910 lines
27 KiB
C#
using System;
|
|
using System.Collections;
|
|
using RecRoom;
|
|
using UnityEngine;
|
|
|
|
// Token: 0x020010EC RID: 4332
|
|
public class UIProjector : MonoBehaviour
|
|
{
|
|
// Token: 0x060250CA RID: 151754 RVA: 0x00A3E47C File Offset: 0x00A3C67C
|
|
private void GCOFOGPIJJA()
|
|
{
|
|
this.FIOLBHFJENN = base.GetComponentInChildren<Animator>();
|
|
this.IBMCGKDECLN = global::UnityEngine.Object.Instantiate<Canvas>(this.viewPrefab);
|
|
this.IBMCGKDECLN.transform.SetParent(this.viewParent, true);
|
|
this.IBMCGKDECLN.transform.localPosition = Vector3.zero;
|
|
this.IBMCGKDECLN.transform.localRotation = Quaternion.identity;
|
|
if (this.IBMCGKDECLN.gameObject.GetComponent<CachedView>())
|
|
{
|
|
this.IBMCGKDECLN = null;
|
|
}
|
|
}
|
|
|
|
// Token: 0x170010FC RID: 4348
|
|
// (get) Token: 0x060250CC RID: 151756 RVA: 0x00A3E558 File Offset: 0x00A3C758
|
|
// (set) Token: 0x060250EB RID: 151787 RVA: 0x00A3EEC8 File Offset: 0x00A3D0C8
|
|
public bool HPHLFFNHBLI
|
|
{
|
|
get
|
|
{
|
|
return this.DJLGNHBKDLG;
|
|
}
|
|
set
|
|
{
|
|
this.DJLGNHBKDLG = value;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250CD RID: 151757 RVA: 0x00A3E560 File Offset: 0x00A3C760
|
|
private void OnDrawGizmosSelected()
|
|
{
|
|
Gizmos.color = Color.red;
|
|
Gizmos.DrawWireSphere(base.transform.position, this.innerProximityTriggerRadius);
|
|
Gizmos.color = Color.green;
|
|
Gizmos.DrawWireSphere(base.transform.position, this.outerProximityTriggerRadius);
|
|
if (this.maxOpeningAngle < 180f)
|
|
{
|
|
Gizmos.color = Color.yellow;
|
|
Gizmos.DrawLine(base.transform.position, base.transform.position + Quaternion.Euler(0f, this.maxOpeningAngle, 0f) * base.transform.forward * this.outerProximityTriggerRadius);
|
|
Gizmos.DrawLine(base.transform.position, base.transform.position + Quaternion.Euler(0f, -this.maxOpeningAngle, 0f) * base.transform.forward * this.outerProximityTriggerRadius);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250CE RID: 151758 RVA: 0x00A3E668 File Offset: 0x00A3C868
|
|
private void EACPMAEJIGI(float NOBAPCOKFIL)
|
|
{
|
|
this.FIOLBHFJENN.SetFloat(UIProjector.IPIKPLLAGCH, NOBAPCOKFIL);
|
|
}
|
|
|
|
// Token: 0x060250CF RID: 151759 RVA: 0x00A3E67C File Offset: 0x00A3C87C
|
|
private void ICLBBCHPEGD()
|
|
{
|
|
if (this.HGJDFOEFNBC != null)
|
|
{
|
|
base.StopCoroutine(this.HGJDFOEFNBC);
|
|
this.HGJDFOEFNBC = null;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250D0 RID: 151760 RVA: 0x00A3E69C File Offset: 0x00A3C89C
|
|
private void KAMKEPCADOL(bool NOBAPCOKFIL)
|
|
{
|
|
NOBAPCOKFIL = !NOBAPCOKFIL && this.HPHLFFNHBLI;
|
|
if (this.FCCNMKHINEO != NOBAPCOKFIL)
|
|
{
|
|
if (NOBAPCOKFIL)
|
|
{
|
|
AudioManager.Play3DSFX(this.openAudioClip, base.transform.position, null);
|
|
this.AHPKHEMLDCI();
|
|
}
|
|
else
|
|
{
|
|
AudioManager.Play3DSFX(this.closeAudioClip, base.transform.position, null);
|
|
this.PBBGPOPEBHE();
|
|
}
|
|
}
|
|
this.FCCNMKHINEO = NOBAPCOKFIL;
|
|
this.FIOLBHFJENN.SetBool(UIProjector.GAFDFDFJLLL, this.FCCNMKHINEO);
|
|
}
|
|
|
|
// Token: 0x170010FE RID: 4350
|
|
// (get) Token: 0x060250D1 RID: 151761 RVA: 0x00A3E72C File Offset: 0x00A3C92C
|
|
private bool JAMMINEADLF
|
|
{
|
|
get
|
|
{
|
|
return !this.IOOKOMFIBCG && this.FIOLBHFJENN.GetCurrentAnimatorStateInfo(0).shortNameHash == UIProjector.IFNKNMOHIDA;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250D2 RID: 151762 RVA: 0x00A3E764 File Offset: 0x00A3C964
|
|
private void KCKPOOJHBNO()
|
|
{
|
|
this.IOOKOMFIBCG = true;
|
|
}
|
|
|
|
// Token: 0x060250D4 RID: 151764 RVA: 0x00A3E7A0 File Offset: 0x00A3C9A0
|
|
private void GIPENMJFNMB(float NOBAPCOKFIL)
|
|
{
|
|
this.FIOLBHFJENN.SetFloat(UIProjector.IPIKPLLAGCH, NOBAPCOKFIL);
|
|
}
|
|
|
|
// Token: 0x060250D5 RID: 151765 RVA: 0x00A3E7B4 File Offset: 0x00A3C9B4
|
|
private void NJFJBFMAMIA(float NOBAPCOKFIL)
|
|
{
|
|
this.FIOLBHFJENN.SetFloat(UIProjector.IPIKPLLAGCH, NOBAPCOKFIL);
|
|
}
|
|
|
|
// Token: 0x060250D6 RID: 151766 RVA: 0x00A3E7C8 File Offset: 0x00A3C9C8
|
|
private bool EAAOIIJNCLJ()
|
|
{
|
|
return !this.OMLLLNNOHFE() && this.FIOLBHFJENN.GetCurrentAnimatorStateInfo(0).shortNameHash == UIProjector.IFNKNMOHIDA;
|
|
}
|
|
|
|
// Token: 0x060250D7 RID: 151767 RVA: 0x00A3E800 File Offset: 0x00A3CA00
|
|
private void JKHCFBENDDN()
|
|
{
|
|
if (base.enabled)
|
|
{
|
|
this.ICLBBCHPEGD();
|
|
this.HGJDFOEFNBC = base.StartCoroutine(this.HIKDMFIGLHB());
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250D8 RID: 151768 RVA: 0x00A3E828 File Offset: 0x00A3CA28
|
|
private void IIOEFJNEOAB(bool NOBAPCOKFIL)
|
|
{
|
|
NOBAPCOKFIL = !NOBAPCOKFIL && this.HPHLFFNHBLI;
|
|
if (this.FCCNMKHINEO != NOBAPCOKFIL)
|
|
{
|
|
if (NOBAPCOKFIL)
|
|
{
|
|
AudioManager.Play3DSFX(this.openAudioClip, base.transform.position, null);
|
|
this.JKHCFBENDDN();
|
|
}
|
|
else
|
|
{
|
|
AudioManager.Play3DSFX(this.closeAudioClip, base.transform.position, null);
|
|
this.AENENIPGLBC();
|
|
}
|
|
}
|
|
this.FCCNMKHINEO = NOBAPCOKFIL;
|
|
this.FIOLBHFJENN.SetBool(UIProjector.GAFDFDFJLLL, this.FCCNMKHINEO);
|
|
}
|
|
|
|
// Token: 0x060250D9 RID: 151769 RVA: 0x00A3E8B8 File Offset: 0x00A3CAB8
|
|
public void NOJFAMDBIAC(bool NOBAPCOKFIL)
|
|
{
|
|
this.DJLGNHBKDLG = NOBAPCOKFIL;
|
|
}
|
|
|
|
// Token: 0x060250DA RID: 151770 RVA: 0x00A3E8C4 File Offset: 0x00A3CAC4
|
|
private bool MDMPACJILKL()
|
|
{
|
|
return !this.OMLLLNNOHFE() && this.FIOLBHFJENN.GetCurrentAnimatorStateInfo(1).shortNameHash == UIProjector.IFNKNMOHIDA;
|
|
}
|
|
|
|
// Token: 0x060250DB RID: 151771 RVA: 0x00A3E8FC File Offset: 0x00A3CAFC
|
|
private void GGGPONCFHPC()
|
|
{
|
|
if (Player.LocalPlayerExists)
|
|
{
|
|
Vector3 vector = Vector3.ProjectOnPlane(Player.LocalPlayer.HFDJIFFPEFM().transform.position - base.transform.position, Vector3.up);
|
|
float sqrMagnitude = vector.sqrMagnitude;
|
|
if ((sqrMagnitude <= this.outerProximityTriggerRadius * this.outerProximityTriggerRadius && sqrMagnitude < this.innerProximityTriggerRadius * this.innerProximityTriggerRadius) || this.HPHLFFNHBLI)
|
|
{
|
|
Vector3 normalized = Vector3.ProjectOnPlane(base.transform.forward, Vector3.up).normalized;
|
|
vector.Normalize();
|
|
float num = Vector3.Angle(normalized, vector);
|
|
if (num <= this.maxOpeningAngle)
|
|
{
|
|
GameManager gameManager = RecRoomSceneManager.LEILGOOHEOI().EBHBJAFODKA;
|
|
bool flag = !ModeRestriction.AEOIKIHKHJO(this.supportedModes) || !ModeRestriction.ENOLDFFPECM(this.supportedRoomModes) || gameManager == null || gameManager.PNOOBNCKAMJ == null || this.dontOpenInGameModes.KFLBKDPEHEN(gameManager.PNOOBNCKAMJ.ModeType);
|
|
if (flag && !this.ILCJJLEMFMJ())
|
|
{
|
|
this.DLGDJGKONHA(false);
|
|
}
|
|
else if (!flag && this.IOOKOMFIBCG)
|
|
{
|
|
this.IOOKOMFIBCG = true;
|
|
}
|
|
if (this.IOOKOMFIBCG)
|
|
{
|
|
float num2 = Mathf.Sign(Vector3.Dot(Vector3.Cross(normalized, vector), Vector3.up));
|
|
this.GIPENMJFNMB(Mathf.Min(this.maxRotationAngle, num) * num2);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.GMIHIEICKEO(false);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.GMIHIEICKEO(true);
|
|
}
|
|
if (this.IBMCGKDECLN == null)
|
|
{
|
|
ImposterGraphicRaycaster componentInChildren = base.GetComponentInChildren<ImposterGraphicRaycaster>();
|
|
if (componentInChildren != null)
|
|
{
|
|
this.IBMCGKDECLN = componentInChildren.gameObject.GetComponent<Canvas>();
|
|
}
|
|
}
|
|
if (this.IBMCGKDECLN != null)
|
|
{
|
|
this.IBMCGKDECLN.gameObject.SetActive(this.GLKJEFHOPLI());
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250DC RID: 151772 RVA: 0x00A3EB18 File Offset: 0x00A3CD18
|
|
private IEnumerator GPCGJDEIIHB()
|
|
{
|
|
yield return SingletonMonoBehaviour<AudioManager>.NCKMBFBMBFM.RunChangeAudioVolume(this.GMKCCFGOIJM.AMAFHCLALMM, this.ambientHumAudioClip.volume, 0f, 1f);
|
|
AudioManager.StopLoopingSFX(this.GMKCCFGOIJM);
|
|
this.GMKCCFGOIJM = null;
|
|
this.HGJDFOEFNBC = null;
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x060250DD RID: 151773 RVA: 0x00A3EB34 File Offset: 0x00A3CD34
|
|
private void KDAPFAFLHAF()
|
|
{
|
|
Gizmos.color = Color.red;
|
|
Gizmos.DrawWireSphere(base.transform.position, this.innerProximityTriggerRadius);
|
|
Gizmos.color = Color.green;
|
|
Gizmos.DrawWireSphere(base.transform.position, this.outerProximityTriggerRadius);
|
|
if (this.maxOpeningAngle < 447f)
|
|
{
|
|
Gizmos.color = Color.yellow;
|
|
Gizmos.DrawLine(base.transform.position, base.transform.position + Quaternion.Euler(19f, this.maxOpeningAngle, 1562f) * base.transform.forward * this.outerProximityTriggerRadius);
|
|
Gizmos.DrawLine(base.transform.position, base.transform.position + Quaternion.Euler(103f, -this.maxOpeningAngle, 1818f) * base.transform.forward * this.outerProximityTriggerRadius);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250DE RID: 151774 RVA: 0x00A3EC3C File Offset: 0x00A3CE3C
|
|
private void LMEGOIHONGK()
|
|
{
|
|
this.GMIHIEICKEO(true);
|
|
}
|
|
|
|
// Token: 0x060250DF RID: 151775 RVA: 0x00A3EC48 File Offset: 0x00A3CE48
|
|
private void GDMCGLFNGMM()
|
|
{
|
|
if (this.HGJDFOEFNBC != null)
|
|
{
|
|
base.StopCoroutine(this.HGJDFOEFNBC);
|
|
this.HGJDFOEFNBC = null;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250E0 RID: 151776 RVA: 0x00A3EC68 File Offset: 0x00A3CE68
|
|
private void GMIHIEICKEO(bool NOBAPCOKFIL)
|
|
{
|
|
NOBAPCOKFIL = NOBAPCOKFIL || this.HPHLFFNHBLI;
|
|
if (this.FCCNMKHINEO != NOBAPCOKFIL)
|
|
{
|
|
if (NOBAPCOKFIL)
|
|
{
|
|
AudioManager.Play3DSFX(this.openAudioClip, base.transform.position, null);
|
|
this.OBHLEAJKLLG();
|
|
}
|
|
else
|
|
{
|
|
AudioManager.Play3DSFX(this.closeAudioClip, base.transform.position, null);
|
|
this.CFBFDEBAFEM();
|
|
}
|
|
}
|
|
this.FCCNMKHINEO = NOBAPCOKFIL;
|
|
this.FIOLBHFJENN.SetBool(UIProjector.GAFDFDFJLLL, this.FCCNMKHINEO);
|
|
}
|
|
|
|
// Token: 0x060250E1 RID: 151777 RVA: 0x00A3ECF8 File Offset: 0x00A3CEF8
|
|
private void EGPMIJEONDE()
|
|
{
|
|
if (base.enabled)
|
|
{
|
|
this.GDMCGLFNGMM();
|
|
this.HGJDFOEFNBC = base.StartCoroutine(this.AOBOJMPMMEI());
|
|
}
|
|
else
|
|
{
|
|
AudioManager.StopLoopingSFX(this.GMKCCFGOIJM);
|
|
this.GMKCCFGOIJM = null;
|
|
this.HGJDFOEFNBC = null;
|
|
}
|
|
}
|
|
|
|
// Token: 0x170010FD RID: 4349
|
|
// (get) Token: 0x060250E2 RID: 151778 RVA: 0x00A3ED48 File Offset: 0x00A3CF48
|
|
// (set) Token: 0x06025106 RID: 151814 RVA: 0x00A3F860 File Offset: 0x00A3DA60
|
|
private bool IOOKOMFIBCG
|
|
{
|
|
get
|
|
{
|
|
return this.FCCNMKHINEO;
|
|
}
|
|
set
|
|
{
|
|
value = value || this.HPHLFFNHBLI;
|
|
if (this.FCCNMKHINEO != value)
|
|
{
|
|
if (value)
|
|
{
|
|
AudioManager.Play3DSFX(this.openAudioClip, base.transform.position, null);
|
|
this.AHPKHEMLDCI();
|
|
}
|
|
else
|
|
{
|
|
AudioManager.Play3DSFX(this.closeAudioClip, base.transform.position, null);
|
|
this.PBBGPOPEBHE();
|
|
}
|
|
}
|
|
this.FCCNMKHINEO = value;
|
|
this.FIOLBHFJENN.SetBool(UIProjector.GAFDFDFJLLL, this.FCCNMKHINEO);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250E3 RID: 151779 RVA: 0x00A3ED50 File Offset: 0x00A3CF50
|
|
private IEnumerator AOBOJMPMMEI()
|
|
{
|
|
yield return SingletonMonoBehaviour<AudioManager>.NCKMBFBMBFM.RunChangeAudioVolume(this.GMKCCFGOIJM.AMAFHCLALMM, this.ambientHumAudioClip.volume, 0f, 1f);
|
|
AudioManager.StopLoopingSFX(this.GMKCCFGOIJM);
|
|
this.GMKCCFGOIJM = null;
|
|
this.HGJDFOEFNBC = null;
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x060250E4 RID: 151780 RVA: 0x00A3ED6C File Offset: 0x00A3CF6C
|
|
private void Start()
|
|
{
|
|
this.IOOKOMFIBCG = false;
|
|
}
|
|
|
|
// Token: 0x060250E5 RID: 151781 RVA: 0x00A3ED78 File Offset: 0x00A3CF78
|
|
private void ACNKPEFNLFO()
|
|
{
|
|
this.KAMKEPCADOL(true);
|
|
}
|
|
|
|
// Token: 0x060250E6 RID: 151782 RVA: 0x00A3ED84 File Offset: 0x00A3CF84
|
|
private void OnDisable()
|
|
{
|
|
if (this.IOOKOMFIBCG)
|
|
{
|
|
AudioManager.StopLoopingSFX(this.GMKCCFGOIJM);
|
|
this.GMKCCFGOIJM = null;
|
|
this.HGJDFOEFNBC = null;
|
|
this.FCCNMKHINEO = false;
|
|
this.FIOLBHFJENN.MMEHIAJOEHA(UIProjector.GAFDFDFJLLL, this.FCCNMKHINEO);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250E7 RID: 151783 RVA: 0x00A3EDD4 File Offset: 0x00A3CFD4
|
|
private void IHHDKEHDCGA()
|
|
{
|
|
if (base.enabled)
|
|
{
|
|
this.KNJADMBPBJM();
|
|
this.HGJDFOEFNBC = base.StartCoroutine(this.IEKLHKMAHDJ());
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250E8 RID: 151784 RVA: 0x00A3EDFC File Offset: 0x00A3CFFC
|
|
private void KNJADMBPBJM()
|
|
{
|
|
if (this.HGJDFOEFNBC != null)
|
|
{
|
|
base.StopCoroutine(this.HGJDFOEFNBC);
|
|
this.HGJDFOEFNBC = null;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250E9 RID: 151785 RVA: 0x00A3EE1C File Offset: 0x00A3D01C
|
|
private void DLGDJGKONHA(bool NOBAPCOKFIL)
|
|
{
|
|
NOBAPCOKFIL = NOBAPCOKFIL || this.HPHLFFNHBLI;
|
|
if (this.FCCNMKHINEO != NOBAPCOKFIL)
|
|
{
|
|
if (NOBAPCOKFIL)
|
|
{
|
|
AudioManager.Play3DSFX(this.openAudioClip, base.transform.position, null);
|
|
this.JKHCFBENDDN();
|
|
}
|
|
else
|
|
{
|
|
AudioManager.Play3DSFX(this.closeAudioClip, base.transform.position, null);
|
|
this.EGPMIJEONDE();
|
|
}
|
|
}
|
|
this.FCCNMKHINEO = NOBAPCOKFIL;
|
|
this.FIOLBHFJENN.SetBool(UIProjector.GAFDFDFJLLL, this.FCCNMKHINEO);
|
|
}
|
|
|
|
// Token: 0x060250EA RID: 151786 RVA: 0x00A3EEAC File Offset: 0x00A3D0AC
|
|
private IEnumerator IEKLHKMAHDJ()
|
|
{
|
|
if (this.GMKCCFGOIJM == null)
|
|
{
|
|
this.GMKCCFGOIJM = AudioManager.StartLooping3DSFX(this.ambientHumAudioClip, base.transform, null);
|
|
}
|
|
yield return SingletonMonoBehaviour<AudioManager>.NCKMBFBMBFM.RunChangeAudioVolume(this.GMKCCFGOIJM.AMAFHCLALMM, 0f, this.ambientHumAudioClip.volume, 3f);
|
|
this.HGJDFOEFNBC = null;
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x060250EC RID: 151788 RVA: 0x00A3EED4 File Offset: 0x00A3D0D4
|
|
private IEnumerator DKLHCABMMDG()
|
|
{
|
|
if (this.GMKCCFGOIJM == null)
|
|
{
|
|
this.GMKCCFGOIJM = AudioManager.StartLooping3DSFX(this.ambientHumAudioClip, base.transform, null);
|
|
}
|
|
yield return SingletonMonoBehaviour<AudioManager>.NCKMBFBMBFM.RunChangeAudioVolume(this.GMKCCFGOIJM.AMAFHCLALMM, 0f, this.ambientHumAudioClip.volume, 3f);
|
|
this.HGJDFOEFNBC = null;
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x060250ED RID: 151789 RVA: 0x00A3EEF0 File Offset: 0x00A3D0F0
|
|
private void Update()
|
|
{
|
|
if (Player.LocalPlayerExists)
|
|
{
|
|
Vector3 vector = Vector3.ProjectOnPlane(Player.LocalPlayer.BGOGBEPJGPJ.transform.position - base.transform.position, Vector3.up);
|
|
float sqrMagnitude = vector.sqrMagnitude;
|
|
if ((sqrMagnitude <= this.outerProximityTriggerRadius * this.outerProximityTriggerRadius && sqrMagnitude >= this.innerProximityTriggerRadius * this.innerProximityTriggerRadius) || this.HPHLFFNHBLI)
|
|
{
|
|
Vector3 normalized = Vector3.ProjectOnPlane(base.transform.forward, Vector3.up).normalized;
|
|
vector.Normalize();
|
|
float num = Vector3.Angle(normalized, vector);
|
|
if (num <= this.maxOpeningAngle)
|
|
{
|
|
GameManager gameManager = RecRoomSceneManager.NCKMBFBMBFM.EBHBJAFODKA;
|
|
bool flag = ModeRestriction.IsSupported(this.supportedModes) && ModeRestriction.IsSupported(this.supportedRoomModes) && (gameManager == null || gameManager.PNOOBNCKAMJ == null || !this.dontOpenInGameModes.KFLBKDPEHEN(gameManager.PNOOBNCKAMJ.ModeType));
|
|
if (flag && !this.IOOKOMFIBCG)
|
|
{
|
|
this.IOOKOMFIBCG = true;
|
|
}
|
|
else if (!flag && this.IOOKOMFIBCG)
|
|
{
|
|
this.IOOKOMFIBCG = false;
|
|
}
|
|
if (this.IOOKOMFIBCG)
|
|
{
|
|
float num2 = Mathf.Sign(Vector3.Dot(Vector3.Cross(normalized, vector), Vector3.up));
|
|
this.EIODKAOLDAG = Mathf.Min(this.maxRotationAngle, num) * num2;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.IOOKOMFIBCG = false;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.IOOKOMFIBCG = false;
|
|
}
|
|
if (this.IBMCGKDECLN == null)
|
|
{
|
|
ImposterGraphicRaycaster componentInChildren = base.GetComponentInChildren<ImposterGraphicRaycaster>();
|
|
if (componentInChildren != null)
|
|
{
|
|
this.IBMCGKDECLN = componentInChildren.gameObject.GetComponent<Canvas>();
|
|
}
|
|
}
|
|
if (this.IBMCGKDECLN != null)
|
|
{
|
|
this.IBMCGKDECLN.gameObject.SetActive(!this.JAMMINEADLF);
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250EE RID: 151790 RVA: 0x00A3F10C File Offset: 0x00A3D30C
|
|
private void HHHMDBJFABN()
|
|
{
|
|
if (this.OMLLLNNOHFE())
|
|
{
|
|
AudioManager.StopLoopingSFX(this.GMKCCFGOIJM);
|
|
this.GMKCCFGOIJM = null;
|
|
this.HGJDFOEFNBC = null;
|
|
this.FCCNMKHINEO = true;
|
|
this.FIOLBHFJENN.MMEHIAJOEHA(UIProjector.GAFDFDFJLLL, this.FCCNMKHINEO);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250EF RID: 151791 RVA: 0x00A3F15C File Offset: 0x00A3D35C
|
|
private IEnumerator FPFKKKIODMO()
|
|
{
|
|
if (this.GMKCCFGOIJM == null)
|
|
{
|
|
this.GMKCCFGOIJM = AudioManager.StartLooping3DSFX(this.ambientHumAudioClip, base.transform, null);
|
|
}
|
|
yield return SingletonMonoBehaviour<AudioManager>.NCKMBFBMBFM.RunChangeAudioVolume(this.GMKCCFGOIJM.AMAFHCLALMM, 0f, this.ambientHumAudioClip.volume, 3f);
|
|
this.HGJDFOEFNBC = null;
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x060250F0 RID: 151792 RVA: 0x00A3F178 File Offset: 0x00A3D378
|
|
private void PBBGPOPEBHE()
|
|
{
|
|
if (base.enabled)
|
|
{
|
|
this.KNJADMBPBJM();
|
|
this.HGJDFOEFNBC = base.StartCoroutine(this.GGGCJBOLNFF());
|
|
}
|
|
else
|
|
{
|
|
AudioManager.StopLoopingSFX(this.GMKCCFGOIJM);
|
|
this.GMKCCFGOIJM = null;
|
|
this.HGJDFOEFNBC = null;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250F1 RID: 151793 RVA: 0x00A3F1C8 File Offset: 0x00A3D3C8
|
|
private void AENENIPGLBC()
|
|
{
|
|
if (base.enabled)
|
|
{
|
|
this.ICLBBCHPEGD();
|
|
this.HGJDFOEFNBC = base.StartCoroutine(this.GPCGJDEIIHB());
|
|
}
|
|
else
|
|
{
|
|
AudioManager.OIAFCNPLFPJ(this.GMKCCFGOIJM);
|
|
this.GMKCCFGOIJM = null;
|
|
this.HGJDFOEFNBC = null;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250F2 RID: 151794 RVA: 0x00A3F218 File Offset: 0x00A3D418
|
|
private bool OMLLLNNOHFE()
|
|
{
|
|
return this.FCCNMKHINEO;
|
|
}
|
|
|
|
// Token: 0x060250F3 RID: 151795 RVA: 0x00A3F220 File Offset: 0x00A3D420
|
|
private void OBHLEAJKLLG()
|
|
{
|
|
if (base.enabled)
|
|
{
|
|
this.HLIBBGPIKGB();
|
|
this.HGJDFOEFNBC = base.StartCoroutine(this.HIKDMFIGLHB());
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250F4 RID: 151796 RVA: 0x00A3F248 File Offset: 0x00A3D448
|
|
private bool ILCJJLEMFMJ()
|
|
{
|
|
return this.FCCNMKHINEO;
|
|
}
|
|
|
|
// Token: 0x060250F5 RID: 151797 RVA: 0x00A3F250 File Offset: 0x00A3D450
|
|
private void AHPKHEMLDCI()
|
|
{
|
|
if (base.enabled)
|
|
{
|
|
this.KNJADMBPBJM();
|
|
this.HGJDFOEFNBC = base.StartCoroutine(this.JBDPLCPKNAE());
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250F6 RID: 151798 RVA: 0x00A3F278 File Offset: 0x00A3D478
|
|
private void JKOFOCDDNML()
|
|
{
|
|
if (this.ILCJJLEMFMJ())
|
|
{
|
|
AudioManager.StopLoopingSFX(this.GMKCCFGOIJM);
|
|
this.GMKCCFGOIJM = null;
|
|
this.HGJDFOEFNBC = null;
|
|
this.FCCNMKHINEO = false;
|
|
this.FIOLBHFJENN.MMEHIAJOEHA(UIProjector.GAFDFDFJLLL, this.FCCNMKHINEO);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250F7 RID: 151799 RVA: 0x00A3F2C8 File Offset: 0x00A3D4C8
|
|
private void IBAACINLMOB()
|
|
{
|
|
if (base.enabled)
|
|
{
|
|
this.GDMCGLFNGMM();
|
|
this.HGJDFOEFNBC = base.StartCoroutine(this.JBDPLCPKNAE());
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250F8 RID: 151800 RVA: 0x00A3F2F0 File Offset: 0x00A3D4F0
|
|
private void LDHOOGBEGPM()
|
|
{
|
|
if (this.ILCJJLEMFMJ())
|
|
{
|
|
AudioManager.OIAFCNPLFPJ(this.GMKCCFGOIJM);
|
|
this.GMKCCFGOIJM = null;
|
|
this.HGJDFOEFNBC = null;
|
|
this.FCCNMKHINEO = true;
|
|
this.FIOLBHFJENN.MMEHIAJOEHA(UIProjector.GAFDFDFJLLL, this.FCCNMKHINEO);
|
|
}
|
|
}
|
|
|
|
// Token: 0x170010FF RID: 4351
|
|
// (set) Token: 0x060250F9 RID: 151801 RVA: 0x00A3F340 File Offset: 0x00A3D540
|
|
private float EIODKAOLDAG
|
|
{
|
|
set
|
|
{
|
|
this.FIOLBHFJENN.SetFloat(UIProjector.IPIKPLLAGCH, value);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250FA RID: 151802 RVA: 0x00A3F354 File Offset: 0x00A3D554
|
|
private IEnumerator AHBHLCKAOGK()
|
|
{
|
|
if (this.GMKCCFGOIJM == null)
|
|
{
|
|
this.GMKCCFGOIJM = AudioManager.StartLooping3DSFX(this.ambientHumAudioClip, base.transform, null);
|
|
}
|
|
yield return SingletonMonoBehaviour<AudioManager>.NCKMBFBMBFM.RunChangeAudioVolume(this.GMKCCFGOIJM.AMAFHCLALMM, 0f, this.ambientHumAudioClip.volume, 3f);
|
|
this.HGJDFOEFNBC = null;
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x060250FB RID: 151803 RVA: 0x00A3F370 File Offset: 0x00A3D570
|
|
private void Awake()
|
|
{
|
|
this.FIOLBHFJENN = base.GetComponentInChildren<Animator>();
|
|
this.IBMCGKDECLN = global::UnityEngine.Object.Instantiate<Canvas>(this.viewPrefab);
|
|
this.IBMCGKDECLN.transform.SetParent(this.viewParent, false);
|
|
this.IBMCGKDECLN.transform.localPosition = Vector3.zero;
|
|
this.IBMCGKDECLN.transform.localRotation = Quaternion.identity;
|
|
if (this.IBMCGKDECLN.gameObject.GetComponent<CachedView>())
|
|
{
|
|
this.IBMCGKDECLN = null;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250FC RID: 151804 RVA: 0x00A3F3FC File Offset: 0x00A3D5FC
|
|
private bool PCGMFKMADOI()
|
|
{
|
|
return !this.ILCJJLEMFMJ() && this.FIOLBHFJENN.GetCurrentAnimatorStateInfo(0).shortNameHash == UIProjector.IFNKNMOHIDA;
|
|
}
|
|
|
|
// Token: 0x060250FD RID: 151805 RVA: 0x00A3F434 File Offset: 0x00A3D634
|
|
private void KFALDKEGAGD()
|
|
{
|
|
Gizmos.color = Color.red;
|
|
Gizmos.DrawWireSphere(base.transform.position, this.innerProximityTriggerRadius);
|
|
Gizmos.color = Color.green;
|
|
Gizmos.DrawWireSphere(base.transform.position, this.outerProximityTriggerRadius);
|
|
if (this.maxOpeningAngle < 1515f)
|
|
{
|
|
Gizmos.color = Color.yellow;
|
|
Gizmos.DrawLine(base.transform.position, base.transform.position + Quaternion.Euler(297f, this.maxOpeningAngle, 717f) * base.transform.forward * this.outerProximityTriggerRadius);
|
|
Gizmos.DrawLine(base.transform.position, base.transform.position + Quaternion.Euler(1527f, -this.maxOpeningAngle, 774f) * base.transform.forward * this.outerProximityTriggerRadius);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060250FE RID: 151806 RVA: 0x00A3F53C File Offset: 0x00A3D73C
|
|
private IEnumerator HIKDMFIGLHB()
|
|
{
|
|
if (this.GMKCCFGOIJM == null)
|
|
{
|
|
this.GMKCCFGOIJM = AudioManager.StartLooping3DSFX(this.ambientHumAudioClip, base.transform, null);
|
|
}
|
|
yield return SingletonMonoBehaviour<AudioManager>.NCKMBFBMBFM.RunChangeAudioVolume(this.GMKCCFGOIJM.AMAFHCLALMM, 0f, this.ambientHumAudioClip.volume, 3f);
|
|
this.HGJDFOEFNBC = null;
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x060250FF RID: 151807 RVA: 0x00A3F558 File Offset: 0x00A3D758
|
|
private void HLIBBGPIKGB()
|
|
{
|
|
if (this.HGJDFOEFNBC != null)
|
|
{
|
|
base.StopCoroutine(this.HGJDFOEFNBC);
|
|
this.HGJDFOEFNBC = null;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06025100 RID: 151808 RVA: 0x00A3F578 File Offset: 0x00A3D778
|
|
private void CFBFDEBAFEM()
|
|
{
|
|
if (base.enabled)
|
|
{
|
|
this.ICLBBCHPEGD();
|
|
this.HGJDFOEFNBC = base.StartCoroutine(this.INMJEMCLBMC());
|
|
}
|
|
else
|
|
{
|
|
AudioManager.StopLoopingSFX(this.GMKCCFGOIJM);
|
|
this.GMKCCFGOIJM = null;
|
|
this.HGJDFOEFNBC = null;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06025101 RID: 151809 RVA: 0x00A3F5C8 File Offset: 0x00A3D7C8
|
|
private void OBFADPEEBLG()
|
|
{
|
|
if (Player.LocalPlayerExists)
|
|
{
|
|
Vector3 vector = Vector3.ProjectOnPlane(Player.LocalPlayer.BGOGBEPJGPJ.transform.position - base.transform.position, Vector3.up);
|
|
float sqrMagnitude = vector.sqrMagnitude;
|
|
if ((sqrMagnitude <= this.outerProximityTriggerRadius * this.outerProximityTriggerRadius && sqrMagnitude >= this.innerProximityTriggerRadius * this.innerProximityTriggerRadius) || this.HPHLFFNHBLI)
|
|
{
|
|
Vector3 normalized = Vector3.ProjectOnPlane(base.transform.forward, Vector3.up).normalized;
|
|
vector.Normalize();
|
|
float num = Vector3.Angle(normalized, vector);
|
|
if (num <= this.maxOpeningAngle)
|
|
{
|
|
GameManager gameManager = RecRoomSceneManager.LEILGOOHEOI().EBHBJAFODKA;
|
|
bool flag = !ModeRestriction.CLKHEDBBDKL(this.supportedModes) || !ModeRestriction.CPAEJDJBNBE(this.supportedRoomModes) || gameManager == null || gameManager.PNOOBNCKAMJ == null || !this.dontOpenInGameModes.KFLBKDPEHEN(gameManager.PNOOBNCKAMJ.ModeType);
|
|
if (flag && !this.ILCJJLEMFMJ())
|
|
{
|
|
this.IOOKOMFIBCG = true;
|
|
}
|
|
else if (!flag && this.ILCJJLEMFMJ())
|
|
{
|
|
this.OIIPBLMFIHE(false);
|
|
}
|
|
if (this.ILCJJLEMFMJ())
|
|
{
|
|
float num2 = Mathf.Sign(Vector3.Dot(Vector3.Cross(normalized, vector), Vector3.up));
|
|
this.EIODKAOLDAG = Mathf.Min(this.maxRotationAngle, num) * num2;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.IIOEFJNEOAB(false);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.KAMKEPCADOL(false);
|
|
}
|
|
if (this.IBMCGKDECLN == null)
|
|
{
|
|
ImposterGraphicRaycaster componentInChildren = base.GetComponentInChildren<ImposterGraphicRaycaster>();
|
|
if (componentInChildren != null)
|
|
{
|
|
this.IBMCGKDECLN = componentInChildren.gameObject.GetComponent<Canvas>();
|
|
}
|
|
}
|
|
if (this.IBMCGKDECLN != null)
|
|
{
|
|
this.IBMCGKDECLN.gameObject.SetActive(!this.MDMPACJILKL());
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06025102 RID: 151810 RVA: 0x00A3F7E4 File Offset: 0x00A3D9E4
|
|
private IEnumerator JBDPLCPKNAE()
|
|
{
|
|
if (this.GMKCCFGOIJM == null)
|
|
{
|
|
this.GMKCCFGOIJM = AudioManager.StartLooping3DSFX(this.ambientHumAudioClip, base.transform, null);
|
|
}
|
|
yield return SingletonMonoBehaviour<AudioManager>.NCKMBFBMBFM.RunChangeAudioVolume(this.GMKCCFGOIJM.AMAFHCLALMM, 0f, this.ambientHumAudioClip.volume, 3f);
|
|
this.HGJDFOEFNBC = null;
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x06025103 RID: 151811 RVA: 0x00A3F800 File Offset: 0x00A3DA00
|
|
private IEnumerator INMJEMCLBMC()
|
|
{
|
|
yield return SingletonMonoBehaviour<AudioManager>.NCKMBFBMBFM.RunChangeAudioVolume(this.GMKCCFGOIJM.AMAFHCLALMM, this.ambientHumAudioClip.volume, 0f, 1f);
|
|
AudioManager.StopLoopingSFX(this.GMKCCFGOIJM);
|
|
this.GMKCCFGOIJM = null;
|
|
this.HGJDFOEFNBC = null;
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x06025104 RID: 151812 RVA: 0x00A3F81C File Offset: 0x00A3DA1C
|
|
private bool GLKJEFHOPLI()
|
|
{
|
|
return this.OMLLLNNOHFE() || this.FIOLBHFJENN.GetCurrentAnimatorStateInfo(1).shortNameHash == UIProjector.IFNKNMOHIDA;
|
|
}
|
|
|
|
// Token: 0x06025105 RID: 151813 RVA: 0x00A3F854 File Offset: 0x00A3DA54
|
|
public void FBNNOOHKIOM(bool NOBAPCOKFIL)
|
|
{
|
|
this.DJLGNHBKDLG = NOBAPCOKFIL;
|
|
}
|
|
|
|
// Token: 0x06025107 RID: 151815 RVA: 0x00A3F8F0 File Offset: 0x00A3DAF0
|
|
private IEnumerator GGGCJBOLNFF()
|
|
{
|
|
yield return SingletonMonoBehaviour<AudioManager>.NCKMBFBMBFM.RunChangeAudioVolume(this.GMKCCFGOIJM.AMAFHCLALMM, this.ambientHumAudioClip.volume, 0f, 1f);
|
|
AudioManager.StopLoopingSFX(this.GMKCCFGOIJM);
|
|
this.GMKCCFGOIJM = null;
|
|
this.HGJDFOEFNBC = null;
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x06025108 RID: 151816 RVA: 0x00A3F90C File Offset: 0x00A3DB0C
|
|
public void MCNIPOAJLJO(bool NOBAPCOKFIL)
|
|
{
|
|
this.DJLGNHBKDLG = NOBAPCOKFIL;
|
|
}
|
|
|
|
// Token: 0x06025109 RID: 151817 RVA: 0x00A3F918 File Offset: 0x00A3DB18
|
|
private void OIIPBLMFIHE(bool NOBAPCOKFIL)
|
|
{
|
|
NOBAPCOKFIL = NOBAPCOKFIL || this.HPHLFFNHBLI;
|
|
if (this.FCCNMKHINEO != NOBAPCOKFIL)
|
|
{
|
|
if (NOBAPCOKFIL)
|
|
{
|
|
AudioManager.Play3DSFX(this.openAudioClip, base.transform.position, null);
|
|
this.OBHLEAJKLLG();
|
|
}
|
|
else
|
|
{
|
|
AudioManager.Play3DSFX(this.closeAudioClip, base.transform.position, null);
|
|
this.AENENIPGLBC();
|
|
}
|
|
}
|
|
this.FCCNMKHINEO = NOBAPCOKFIL;
|
|
this.FIOLBHFJENN.SetBool(UIProjector.GAFDFDFJLLL, this.FCCNMKHINEO);
|
|
}
|
|
|
|
// Token: 0x04005E16 RID: 24086
|
|
[SerializeField]
|
|
[Header("Proximity")]
|
|
private float innerProximityTriggerRadius = 2f;
|
|
|
|
// Token: 0x04005E17 RID: 24087
|
|
[SerializeField]
|
|
private float outerProximityTriggerRadius = 10f;
|
|
|
|
// Token: 0x04005E18 RID: 24088
|
|
[Range(0f, 180f)]
|
|
[SerializeField]
|
|
[Header("Angle")]
|
|
private float maxOpeningAngle = 180f;
|
|
|
|
// Token: 0x04005E19 RID: 24089
|
|
[Range(0f, 180f)]
|
|
[SerializeField]
|
|
private float maxRotationAngle = 180f;
|
|
|
|
// Token: 0x04005E1A RID: 24090
|
|
[Header("UI View")]
|
|
[SerializeField]
|
|
private Canvas viewPrefab;
|
|
|
|
// Token: 0x04005E1B RID: 24091
|
|
[SerializeField]
|
|
private Transform viewParent;
|
|
|
|
// Token: 0x04005E1C RID: 24092
|
|
[SerializeField]
|
|
[Header("Audio")]
|
|
private RecRoomAudioClip openAudioClip;
|
|
|
|
// Token: 0x04005E1D RID: 24093
|
|
[SerializeField]
|
|
private RecRoomAudioClip closeAudioClip;
|
|
|
|
// Token: 0x04005E1E RID: 24094
|
|
[SerializeField]
|
|
private RecRoomAudioClip ambientHumAudioClip;
|
|
|
|
// Token: 0x04005E1F RID: 24095
|
|
[SerializeField]
|
|
[Header("Active Modes")]
|
|
private ModeRestriction.LCOEKJJKEAH supportedModes = ModeRestriction.LCOEKJJKEAH.ALL;
|
|
|
|
// Token: 0x04005E20 RID: 24096
|
|
[SerializeField]
|
|
private ModeRestriction.BGDBFIKJMFI supportedRoomModes = ModeRestriction.BGDBFIKJMFI.ALL;
|
|
|
|
// Token: 0x04005E21 RID: 24097
|
|
[SerializeField]
|
|
private IEFCMNJDPII[] dontOpenInGameModes;
|
|
|
|
// Token: 0x04005E22 RID: 24098
|
|
private static readonly int IPIKPLLAGCH = Animator.StringToHash("Rotate");
|
|
|
|
// Token: 0x04005E23 RID: 24099
|
|
private static readonly int GAFDFDFJLLL = Animator.StringToHash("Open");
|
|
|
|
// Token: 0x04005E24 RID: 24100
|
|
private static readonly int IFNKNMOHIDA = Animator.StringToHash("CloseIdle");
|
|
|
|
// Token: 0x04005E25 RID: 24101
|
|
private Animator FIOLBHFJENN;
|
|
|
|
// Token: 0x04005E26 RID: 24102
|
|
private Canvas IBMCGKDECLN;
|
|
|
|
// Token: 0x04005E27 RID: 24103
|
|
private SFXAudioSource GMKCCFGOIJM;
|
|
|
|
// Token: 0x04005E28 RID: 24104
|
|
private Coroutine HGJDFOEFNBC;
|
|
|
|
// Token: 0x04005E29 RID: 24105
|
|
private bool DJLGNHBKDLG;
|
|
|
|
// Token: 0x04005E2A RID: 24106
|
|
private bool FCCNMKHINEO;
|
|
}
|