| | |
| | | [SerializeField] Button m_ViewItemDetail;
|
| | | [SerializeField] float delayShowTime = 2f;
|
| | |
|
| | |
|
| | | PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | PreciousItemGetModel model { get { return ModelCenter.Instance.GetModel<PreciousItemGetModel>(); } }
|
| | |
|
| | |
| | | {
|
| | | if (model.currentShowItem != default(PreciousItemGetModel.PreciousItem))
|
| | | {
|
| | | var itemModel = playerPack.GetItemByGuid(model.currentShowItem.guid);
|
| | | var item = playerPack.GetItemByGuid(model.currentShowItem.guid);
|
| | | model.ReportConfirmPreciousItem(model.currentShowItem);
|
| | | if (itemModel != null && itemModel.packType == PackType.Item)
|
| | |
|
| | | if (GeneralDefine.onlyUsedAtBackpackItems.Contains(item.itemId))
|
| | | {
|
| | | switch ((ItemType)itemModel.config.Type)
|
| | | WindowCenter.Instance.Open<KnapSackWin>();
|
| | | Clock.AlarmAfter(0.5f, () => { ItemTipUtility.Show(item.guid); });
|
| | | return;
|
| | | }
|
| | |
|
| | | if (item != null && item.packType == PackType.Item)
|
| | | {
|
| | | switch ((ItemType)item.config.Type)
|
| | | {
|
| | | case ItemType.WingsMat:
|
| | | int jumpId = 0;
|
| | | bool isUnlock = ModelCenter.Instance.GetModel<ComposeWinModel>().CheckComposeItemById(itemModel.itemId, out jumpId);
|
| | | bool isUnlock = ModelCenter.Instance.GetModel<ComposeWinModel>().CheckComposeItemById(item.itemId, out jumpId);
|
| | | if (isUnlock)
|
| | | {
|
| | | ItemOperateUtility.Instance.GotoComposeItem(jumpId);
|
| | | }
|
| | | break;
|
| | | default:
|
| | | ItemOperateUtility.Instance.GotoUseItem(itemModel.guid);
|
| | | ItemOperateUtility.Instance.GotoUseItem(item.guid);
|
| | | break;
|
| | | }
|
| | | }
|