wip: Path to Omnissiah
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using UnityEngine;
|
||||
|
||||
[ExecuteInEditMode, DefaultExecutionOrder(1)]
|
||||
public class Portal : MonoBehaviour
|
||||
{
|
||||
[SerializeField, Range(0, 2)] private int _id;
|
||||
[SerializeField, Range(0, 1)] private float _oval;
|
||||
|
||||
public int ID => _id;
|
||||
public float Oval => _oval;
|
||||
|
||||
private void OnDrawGizmos()
|
||||
{
|
||||
Gizmos.matrix = transform.localToWorldMatrix;
|
||||
Gizmos.color = Color.cyan;
|
||||
Gizmos.DrawWireCube(Vector3.zero, new Vector3(1, 1, 0));
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
if (PortalManager.Instance)
|
||||
PortalManager.Instance.RegisterPortal(this);
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
if (PortalManager.Instance)
|
||||
PortalManager.Instance.UnregisterPortal(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user