|
|
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using UnityEngine;
-
- public class InventoryCatch : LogicElementHolder
- {
- [SerializeField]
- private InventoryUI InventoryUI;
-
- public override void OnAdd(LogicElementUI element)
- {
- BagItem item = InventoryUI.content.FirstOrDefault(p => p.canHold(element));
-
- if (item != default)
- item.OnAdd(element);
-
- Destroy(element.gameObject);
- }
-
- public override void OnDoubleClick(LogicElementUI element)
- {
- //DoNothing
- }
-
- public override void OnRemove(LogicElementUI element)
- {
- //DoNothing
- }
- }
|