示例#1
0
 public void CloseTab()
 {
     if (openTab != null)
     {
         UI_MenuTabTabButton tabButtonScpt = openTab.GetComponent <UI_MenuTabTabButton>();
         if (tabButtonScpt != null)
         {
             tabButtonScpt.HidePanel();
         }
         openTab = null;
     }
 }
示例#2
0
    public void OpenTab(GameObject newTab)
    {
        if (openTab != null && openTab != newTab)
        {
            UI_MenuTabTabButton tabButtonScpt = openTab.GetComponent <UI_MenuTabTabButton>();
            if (tabButtonScpt != null)
            {
                tabButtonScpt.HidePanel();
            }
        }

        openTab = newTab;
    }