Пример #1
0
 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);
 }
Пример #2
0
 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);
 }