You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

30 lines
653 B

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
}
}