| | |
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | /// <summary>
|
| | | /// 背包格子
|
| | |
| | | public class PackGirdCell : MonoBehaviour
|
| | | {
|
| | | [SerializeField] ItemCell itemCell;
|
| | | [SerializeField] RedpointBehaviour redPoint; // 此处红点可以用图片表示
|
| | | [SerializeField] Image redPoint; // 用图标代替简化ID管理
|
| | | public void Display(int index)
|
| | | {
|
| | | var guid = PackManager.Instance.GetSinglePack(PackType.Item).itemGuidList[index];
|
| | | if (string.IsNullOrEmpty(guid))
|
| | | return;
|
| | | itemCell.Init(PackManager.Instance.GetItemByGuid(guid));
|
| | | itemCell.button.AddListener(()=>
|
| | | {
|
| | | ItemTipUtility.Show(guid);
|
| | | });
|
| | |
|
| | | redPoint.SetActive(false);
|
| | | }
|
| | | }
|