示例#1
0
    void InitProgress()
    {
        int initPage = 1;

        curShowUIType = GameCenter.inventoryMng.CurShowUIType;
        if (curShowUIType == ItemShowUIType.NORMALBAG && GameCenter.inventoryMng.CanOpenSlot && !GameCenter.noviceGuideMng.StartGuide && !GameCenter.inventoryMng.HaveShowOpenSlot)
        {
            initPage = GameCenter.inventoryMng.BagOpenCount / SystemSettingMng.PER_PAGE_BAG_NUM + 1;
            GameCenter.inventoryMng.HaveShowOpenSlot = true;
        }
        else
        {
            initPage = 1;
        }
        List <EquipmentInfo> backpackItems = new List <EquipmentInfo>(GameCenter.inventoryMng.RealBackpackDictionary.Values);

        backpackItems.Sort(SortEquipment);
        if (backpackPageUI != null)
        {
            backpackPageUI.SetUITypeForShop(curShowUIType);
            backpackPageUI.Init(initPage, backpackItems);
        }
        switch (curShowUIType)
        {
        case ItemShowUIType.NONE:
        case ItemShowUIType.NORMALBAG:
        case ItemShowUIType.GUILDSHOPBAG:
        case ItemShowUIType.MARKETBAG:
        case ItemShowUIType.TRADEBAG:
            if (ArrangeButton != null)
            {
                ArrangeButton.gameObject.SetActive(true);
            }
            break;

        default:
            if (ArrangeButton != null)
            {
                ArrangeButton.gameObject.SetActive(false);
            }
            break;
        }
    }
示例#2
0
 /// <summary>
 /// 设置ItemShowUIType,在Init方法之前调用
 /// </summary>
 /// <param name="_itemShowUIType"></param>
 public void SetUITypeForShop(ItemShowUIType _itemShowUIType)
 {
     curItemShowUIType = _itemShowUIType;
 }