public bool RegisterPortal(DoorPortal portal) { for (var i = 0; i < m_portals.Length; ++i) { if (m_portals[i] == null) { m_portals[i] = portal; return(true); } } return(false); }
public bool DeactivatePortal(DoorPortal portal) { for (int i = 0; i < m_portals.Length; ++i) { if (m_portals[i] == portal) { portalUpArrows[i].gameObject.SetActive(false); portalDownArrows[i].gameObject.SetActive(false); return(true); } } return(false); }