Пример #1
0
 public void CloseAllSubMenues()
 {
     current = null;
     for (int i = 0; i < myMenues.Length; ++i)
     {
         if (myMenues[i].gameObject.activeSelf)
         {
             myMenues[i].CloseMenu();
         }
     }
 }
Пример #2
0
        public RectTransform OpenSubmenu(int inIndex)
        {
            if (inIndex < myMenues.Length && inIndex > -1)
            {
                if (current != null)
                {
                    current.CloseMenu();
                }

                current = myMenues[inIndex];
                current.gameObject.SetActive(true);

                LastMenu = inIndex;

                return(current.GetComponent <RectTransform>());
            }

            return(null);
        }