projectEli/Assets/Inventory System/ICWM Assets/Inventory/Scripts/DragAndDrop/AreaDropSlot.cs

31 lines
1.1 KiB
C#
Raw Normal View History

2022-10-08 02:26:09 +00:00
//********************************************************//
// //
// Copyright © All rights reserved. MyNameIsVoo. 2020. //
// //
// COPYING FORBIDEN //
// //
//********************************************************//
using UnityEngine;
using UnityEngine.EventSystems;
using ICWM.IconSystem;
namespace ICWM
{
namespace DragAndDrop
{
public class AreaDropSlot : MonoBehaviour, IDropHandler
{
public void OnDrop(PointerEventData eventData)
{
DragHandler.isDeleteIcon = true;
DragHandler.itemIcon.GetComponent<DragHandler>().deleteVSP = true;
InventoryBase.instance.DropItem(DragHandler.itemIcon, DragHandler.itemIcon.GetComponentInChildren<ButtonOptions>().CL, false);
GetComponent<PointEnterDropArea>().Button.SetActive(false);
}
}
}
}