Esempio n. 1
0
 private void ResetView()
 {
     if (tabController.TabLibPrefabs[2].TabObj.transform.parent.gameObject.activeSelf)
     {
         EB.IAP.Item[] tempArray = EB.Sparx.Hub.Instance.WalletManager.Payouts;
         bool          hasGift   = false;
         for (int i = 0; i < tempArray.Length; ++i)
         {
             if (tempArray[i].category.CompareTo("comeback") == 0)
             {
                 hasGift = true;
                 break;
             }
         }
         if (!hasGift)
         {
             //礼包按钮隐藏
             tabController.TabLibPrefabs[2].TabObj.transform.parent.gameObject.CustomSetActive(false);
             if (tabController.TabLibPrefabs[2].PressedTabObj.activeSelf)
             {
                 tabController.SelectTab(0);
             }
             tabController.GetComponent <UIGrid>().repositionNow = true;
         }
     }
 }
Esempio n. 2
0
        private void ResetView()
        {
            int tabIndex = 0;
            int count    = 0;

            //添加按钮隐藏判断条件
            for (int i = 1; i < tabController.TabLibPrefabs.Count; i++)
            {
                if (!LTWelfareModel.Instance.JudgeViewClose(i))
                {
                    if (tabIndex == 0)
                    {
                        tabIndex = i;
                    }
                    count++;
                }
                else
                {
                    tabController.TabLibPrefabs[i].TabObj.transform.parent.gameObject.CustomSetActive(false);
                }
            }
            isMoreThenScrollView = count > 5;
            tabController.SelectTab(tabIndex);
            tabController.GetComponent <UIGrid>().repositionNow = true;
        }