feat: Theatre portal

This commit is contained in:
Alexandre Coirier
2026-06-17 19:10:08 +02:00
parent 182d54e973
commit 410fedd8c7
68 changed files with 5341 additions and 558 deletions
@@ -47,7 +47,7 @@ public class Audio_WwiseEventTrigger : MonoBehaviour
}
#if UNITY_EDITOR
private void OnDrawGizmos()
private void OnDrawGizmosSelected()
{
BoxCollider box = GetComponent<BoxCollider>();
if (box == null) return;
@@ -72,7 +72,7 @@ public class LevitationObject : MonoBehaviour
t += _settings.Seed * 7.63f;
float cosT0 = Mathf.Cos(t * .3f);
float cosT1 = Mathf.Cos(t);
float cosT1 = Mathf.Cos(t * .6f);
float sinT0 = Mathf.Sin(t * .3f);
Vector3 offset = GetTargetCenter();
@@ -18,12 +18,30 @@ public class Portal : MonoBehaviour
void OnEnable()
{
#if UNITY_EDITOR
if (!Application.isPlaying)
{
PortalManager pm = FindFirstObjectByType<PortalManager>();
if (pm)
pm.RegisterPortal(this);
return;
}
#endif
if (PortalManager.Instance)
PortalManager.Instance.RegisterPortal(this);
}
void OnDisable()
{
#if UNITY_EDITOR
if (!Application.isPlaying)
{
PortalManager pm = FindFirstObjectByType<PortalManager>();
if (pm)
pm.UnregisterPortal(this);
return;
}
#endif
if (PortalManager.Instance)
PortalManager.Instance.UnregisterPortal(this);
}