| | |
| | | {
|
| | | bool isShowMat = itemId != 0 || itemModel != null ? true : false;
|
| | | itemCell.gameObject.SetActive(isShowMat);
|
| | | itemCell.cellBtn.RemoveAllListeners();
|
| | | itemCell.button.RemoveAllListeners();
|
| | | itemCell.reducebtn.RemoveAllListeners();
|
| | | if (isShowMat)
|
| | | {
|
| | | if (itemModel != null)
|
| | | {
|
| | | itemCell.Init(itemModel);
|
| | | itemCell.cellBtn.AddListener(ClickItemCell);
|
| | | itemCell.button.AddListener(ClickItemCell);
|
| | | }
|
| | | else
|
| | | {
|
| | |
|
| | | ItemCellModel cellModel = new ItemCellModel(itemId);
|
| | | itemCell.Init(cellModel);
|
| | | itemCell.cellBtn.AddListener(ClickItemCell);
|
| | | itemCell.button.AddListener(ClickItemCell);
|
| | | }
|
| | |
|
| | | switch(matType)
|