Exemplo n.º 1
0
 public void CloseAllSubMenues()
 {
     current = null;
     for (int i = 0; i < myMenues.Length; ++i)
     {
         if (myMenues[i].gameObject.activeSelf)
         {
             myMenues[i].CloseMenu();
         }
     }
 }
Exemplo n.º 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);
        }