public void ChangeTab(TabScript tab) { selectedTab.button.interactable = true; selectedTab.panel.gameObject.SetActive(false); tab.button.interactable = false; tab.panel.Enable(city, gui); selectedTab = tab; }
public static void Clear() { WaitingToLaunch = 0; MainScript = null; InventoryScript = null; CharacterMovementScript = null; MiningScript = null; DrawingScript = null; MapReadService = null; InventoryPanel = null; SoundScript = null; }
public void Awake() { tabs = buttons.GetComponentsInChildren <TabScript>(); for (int i = 0; i < tabs.Length; i++) { TabScript tab = tabs[i]; tab.button.onClick.AddListener(() => ChangeTab(tab)); if (i == 0) { defaultTab = tab; selectedTab = tab; } } //gameObject.SetActive(false); }