123456789101112131415161718192021222324 |
- using Assets.HeroEditor4D.InventorySystem.Scripts.Elements;
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.EventSystems;
- public class InventorySlot : MonoBehaviour , IDropHandler
- {
-
- public void OnDrop(PointerEventData eventData){
- if(transform.childCount == 0){
- ItemInventory inventoryItemm = eventData.pointerDrag.GetComponent<ItemInventory>();
- inventoryItemm.parentAfterDrag = transform;
- }
- }
- public void Clear()
- {
- GetComponentInChildren<ItemInventory>().Clear();
- }
- }
|