feat: Theatre portal
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user