예제 #1
0
파일: MallWnd.cs 프로젝트: atom-chen/tianyu
    void RefreshItems(MallItemType _type)
    {
        //Debug.Log ("进入选择TYPE为"+(int)_type);
        curMallType = _type;
        DestroyItem();
        switch ((int)_type)
        {
        case 0: ItemContainer.RefreshItems(GameCenter.newMallMng.RestrictionMallItemDic); break;

        case 1: ItemContainer.RefreshItems(GameCenter.newMallMng.StrengthenMallItemDic); break;

        case 2: ItemContainer.RefreshItems(GameCenter.newMallMng.PetMallItemDic); break;

        case 3: ItemContainer.RefreshItems(GameCenter.newMallMng.DailyMallItemDic); break;

        case 4: ItemContainer.RefreshItems(GameCenter.newMallMng.FashionMallItemDic); break;

        case 5: ItemContainer.RefreshItems(GameCenter.newMallMng.CashMallItemDic); break;

        default:        break;
        }
        RefreshCoin();
        if (uicroll != null)
        {
            uicroll.ResetPosition();
        }
    }
예제 #2
0
 public void OpenWndByType(MallItemType _type)
 {
     //Debug.Log("CurMallType:" + CurMallType+",TYPE:"+_type);
     CurMallType = _type;
     //OpenMall();
     GameCenter.uIMng.SwitchToUI(GUIType.NEWMALL);
 }
예제 #3
0
파일: MallWnd.cs 프로젝트: atom-chen/tianyu
    void OpenWndByType()
    {
        MallItemType _type = GameCenter.newMallMng.CurMallType;

        for (int i = 0; i < toggles.Length; i++)
        {
            if (toggles[i].value)
            {
                _type = (MallItemType)(i);
                break;
            }
        }
        RefreshItems(_type);
    }
예제 #4
0
    /// <summary>
    /// 注册
    /// </summary>
    protected virtual void Init(MainPlayerMng _main)
    {
        Dictionary <int, MallRef> all = ConfigMng.Instance.AllMallItem;

        using (var e = all.GetEnumerator())
        {
            while (e.MoveNext())
            {
                MallItemDic[e.Current.Key] = new MallItemInfo(e.Current.Key);
            }
        }
        C2S_AskBuyItemNum();
        CurMallType = MallItemType.RESTRICTION;
        MsgHander.Regist(0xD373, S2C_OnGetBuyNums);
    }