Exemple #1
0
    private void LeftBtnClick()
    {
        _rightBuyTF.gameObject.SetActive(false);
        _leftBuyTF.gameObject.SetActive(true);

        isRightBtnOrnament = false;

        for (int i = 0; i < content.childCount; i++)
        {
            if (content.GetChild(i).GetComponent <UIOrnament>().isClick)
            {
                isPromotion    = content.GetChild(i).GetComponent <UIOrnament>().isPromotion;
                todayBuyLimit  = content.GetChild(i).GetComponent <UIOrnament>().todayBuyLimit;
                limitStr       = content.GetChild(i).GetComponent <UIOrnament>().limitStr;
                iconName       = content.GetChild(i).GetComponent <UIOrnament>().iconName;
                popIconName    = content.GetChild(i).GetComponent <UIOrnament>().popIconName;
                uIOrnament     = content.GetChild(i).GetComponent <UIOrnament>();
                typeGameItem   = content.GetChild(i).GetComponent <UIOrnament>().typeGameItem;
                shopType       = content.GetChild(i).GetComponent <UIOrnament>().shopType;
                curStoreDefine = content.GetChild(i).GetComponent <UIOrnament>().curStoreDefine;
            }
        }
        Debug.Log(iconName);
        OnBuyBtnClick();
    }
Exemple #2
0
 //装饰的重载
 public void InitShow(StoreDefine curStoreDefineTmp, bool isPromotionTmp, int todayBuyLimitTmp, string limitStrTmp, string iconNameTmp, ShopType shopTypeTmp, UIOrnament uiOrnamen, int popIconName, TypeGameItem itemType, bool isRightBtn)
 {
     isOrnament         = true;
     isRightBtnOrnament = isRightBtn;
     Init();
     _popIconName   = popIconName;
     typeGameItem   = itemType;
     curStoreDefine = curStoreDefineTmp;
     isPromotion    = isPromotionTmp;
     todayBuyLimit  = todayBuyLimitTmp;
     limitStr       = limitStrTmp;
     iconName       = iconNameTmp;
     shopType       = shopTypeTmp;
     buyAmount      = 1;
     uiSetAmountComponent.ResetDefalut();
     uiSetAmountComponent._maxValue = todayBuyLimit;
     RefreshShopChoiceUI();
     choicedUIOrnament = uiOrnamen;
 }
Exemple #3
0
    public void Init()
    {
        leftBtn.onClick.RemoveAllListeners();
        leftBtn.onClick.AddListener(LeftBtnClick);
        rightBtn.onClick.RemoveAllListeners();
        rightBtn.onClick.AddListener(RightBtnClick);

        downClickBtn.onClick.RemoveAllListeners();
        //downClickBtn.onClick.AddListener(DownClick);

        isPromotion    = content.GetChild(0).GetComponent <UIOrnament>().isPromotion;
        limitStr       = content.GetChild(0).GetComponent <UIOrnament>().limitStr;
        iconName       = content.GetChild(0).GetComponent <UIOrnament>().iconName;
        popIconName    = content.GetChild(0).GetComponent <UIOrnament>().popIconName;
        uIOrnament     = content.GetChild(0).GetComponent <UIOrnament>();
        typeGameItem   = content.GetChild(0).GetComponent <UIOrnament>().typeGameItem;
        shopType       = content.GetChild(0).GetComponent <UIOrnament>().shopType;
        curStoreDefine = content.GetChild(0).GetComponent <UIOrnament>().curStoreDefine;
        todayBuyLimit  = content.GetChild(0).GetComponent <UIOrnament>().todayBuyLimit;

        FirstUpdatePopInfo();
    }