예제 #1
0
        /// <summary>
        ///     Switches current shop tab to the one with the respective index.
        /// </summary>
        /// <param name="tabIndex">Tab index to switch to</param>
        private void SwitchTab(int tabIndex)
        {
            // make sure we dont go out of bounds
            if ((tabIndex < 0) || (tabIndex >= _setup.Categories.Length))
            {
                return;
            }

            // hide current tab, re assign and show again
            _currentTab.Hide();
            _currentTab = _shopTabs[tabIndex];
            _currentTab.Show();
        }
예제 #2
0
 private void OpenShop()
 {
     _currentTab = _shopTabs[_defaultTabIndex];
     _currentTab.Show();
     _screen.Show();
 }