コード例 #1
0
    /// <summary>
    /// 选中标签页
    /// </summary>
    /// <param name="page"></param>
    public void OnPageSelect(PackageSelect.ShopPage page)
    {
        if (ShopId == 0)
        {
            return;
        }
        ShopConfigInfo info  = ConfigReader.ShopXmlInfoDict[ShopId];
        List <int>     items = new List <int>();

        switch (page)
        {
        case PackageSelect.ShopPage.ShopPage1:
            items = info.un32ItemIDPage1;
            break;

        case PackageSelect.ShopPage.ShopPage2:
            items = info.un32ItemIDPage2;
            break;

        case PackageSelect.ShopPage.ShopPage3:
            items = info.un32ItemIDPage3;
            break;

        case PackageSelect.ShopPage.ShopPage4:
            items = info.un32ItemIDPage4;
            break;

        case PackageSelect.ShopPage.ShopPage5:
            items = info.un32ItemIDPage5;
            break;

        case PackageSelect.ShopPage.ShopPage6:
            items = GetHeroRecommendEquip();
            break;
        }
        if (items != null && items.Count != 0)
        {
            isRecommendEquip = false;
            if (page == PackageSelect.ShopPage.ShopPage6)
            {
                isRecommendEquip = true;
            }

            BuyPackageItem buy = (BuyPackageItem)ShopItemAll[ShopSelectType.TypeBuy];
            buy.ToggleSelectItem(items);
            this.ToggleSelectPageItem(buy, (items.Count > 0) ? items[0] : 0);
        }
    }
コード例 #2
0
    public void PageButtonToggle(int index)
    {
        Page = (ShopPage)index;
        foreach (ButtonOnPress btn in PageButton)
        {
            if (btn.PrIe == index)
            {
                btn.transform.Find("SpriteSelect").gameObject.SetActive(true);
                continue;
            }
            btn.transform.Find("SpriteSelect").gameObject.SetActive(false);
        }

        BuyPackageItem buyPack = (BuyPackageItem)UIShop.Instance.ShopItemAll[UIShop.ShopSelectType.TypeBuy];

        buyPack.arrowUpDown[0].gameObject.SetActive(false);
        buyPack.arrowUpDown[1].gameObject.SetActive(true);
    }