Exemplo n.º 1
0
 private void DestroyDisplayingContent()
 {
     if (currentlyDisplayingContent == null)
     {
         return;
     }
     GameObject.Destroy(currentlyDisplayingContent.gameObject);
     currentlyDisplayingContent = null;
 }
Exemplo n.º 2
0
        private void ShowDisplayContentOfTab(ContentTab tab)
        {
            DestroyDisplayingContent();
            TabDisplayInfo?tabInfo = currentDisplaySetting.GetInfoByName(tab.TabName);

            if (tabInfo.HasValue)
            {
                currentlyDisplayingContent = GameObject.Instantiate <TabContent>(tabInfo.Value.displayContentPrefab);
                currentlyDisplayingContent.transform.SetParent(contentContainer.transform, false);
                currentlyDisplayingContent.Initialize(tab);
            }
        }
Exemplo n.º 3
0
 public TabDisplayInfo(string name, Sprite icon, TabContent displayContentPrefab)
 {
     TabName = name;
     TabIcon = icon;
     this.displayContentPrefab = displayContentPrefab;
 }