| | |
| | | SetItemCell(grid, xbConfig.GridItemInfo, xbConfig.GridLibInfo, manager.xbGridArr); |
| | | } |
| | | |
| | | public void SetCountActive(ItemCell itemCell, long count) |
| | | { |
| | | itemCell.countText.SetActive(count > 1); |
| | | } |
| | | |
| | | |
| | | private void SetItemCell(int grid, Dictionary<int, int[]> gridItemInfo, Dictionary<int, int> gridLibInfo, int[] xbGridArr) |
| | | { |
| | | libButton.SetActive(false); |
| | |
| | | { |
| | | itemCell.SetActive(true); |
| | | itemCell.Init(new ItemCellModel(itemInfo[0], true, itemInfo[1])); |
| | | SetCountActive(itemCell, itemInfo[1]); |
| | | itemCell.button.SetListener(() => ItemTipUtility.Show(itemInfo[0])); |
| | | return; |
| | | } |
| | |
| | | if (!TryGetHeroItemInfo(heroID, libID, list, out int itemID, out int itemCount)) return; |
| | | itemCell.SetActive(true); |
| | | itemCell.Init(new ItemCellModel(itemID, true, itemCount)); |
| | | SetCountActive(itemCell, itemCount); |
| | | itemCell.button.SetListener(() => ItemTipUtility.Show(itemID)); |
| | | } |
| | | else |