public void SetItemSelectStatus(object obj) { MyItemLineAreaList.ApplyAllItem(P => P.SetItemSelectStatus(obj)); }
void ShowItem(ShowItemBtnType shotItemType) { CurrentShowType = shotItemType; GetBestItemList(); //BestItemList.ApplyAllItem(P=>TraceUtil.Log(String.Format("BestItem:{0},{1}",P.Key,LanguageTextManager.GetString(P.Value.LocalItemData._szGoodsName)))); MyItemLineAreaList.ApplyAllItem(P => Destroy(P.gameObject)); MyItemLineAreaList.Clear(); switch (shotItemType) { case ShowItemBtnType.All: MyPackItemList = ContainerInfomanager.Instance.GetPackItemList(); break; case ShowItemBtnType.Equipt: MyPackItemList = ContainerInfomanager.Instance.GetPackItemList().FindAll(P => P.LocalItemData._GoodsClass == 1 && P.LocalItemData._GoodsSubClass <= 6); break; case ShowItemBtnType.Other: MyPackItemList = ContainerInfomanager.Instance.GetPackItemList().FindAll(P => P.LocalItemData._GoodsClass == 2 || (P.LocalItemData._GoodsClass == 3 && P.LocalItemData._GoodsSubClass != 3)); break; case ShowItemBtnType.Jewel: MyPackItemList = ContainerInfomanager.Instance.GetPackItemList().FindAll(P => (P.LocalItemData._GoodsClass == 3 && P.LocalItemData._GoodsSubClass == 3)); break; } MyPackItemList.Sort((left, right) => { if (left.sSyncContainerGoods_SC.nPlace < right.sSyncContainerGoods_SC.nPlace) { return(-1); } else if (left.sSyncContainerGoods_SC.nPlace == right.sSyncContainerGoods_SC.nPlace) { return(0); } else { return(1); } }); int allPackNum = ContainerInfomanager.Instance.GetAllPackMaxNum(); int itemLineAreaNum = allPackNum / 4 + (allPackNum % 4 > 0 ? 1 : 0); m_shouldMove = itemLineAreaNum > 3; for (int i = 0; i <= itemLineAreaNum; i++) { // 等于最大的包裹数时,不需要解锁栏 if (i >= 80 / 4) { break; } bool isLock = i == itemLineAreaNum; SingleItemLineArea newItemLineArea = GetNewSingleItemLineArea(i); newItemLineArea.Init(i, itemLineAreaNum, isLock, this, NoticeToDragSlerp); MyItemLineAreaList.Add(newItemLineArea); } ResetItemListPanelPosition(); if (m_noticeToDragAmount != 0) { StartCoroutine(DragAmountSlerp(m_noticeToDragAmount)); m_noticeToDragAmount = 0; } else { if (HasGuideArrow) { m_dragPanelComp.LockDraggable = true; } else { m_dragPanelComp.LockDraggable = false; } } }