using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Slot : MonoBehaviour
{
private Inventory inventory;
public int i;
void Start(){
inventory = GameObject.FindGameObjectWithTag("player").GetComponent <Inventory> ();
}
void Update(){
if(transform.childCount <= 0){
inventory.isFull[i] = false;
}
}
public void DropItem(){
foreach(Transform child in transform){
child.GetComponent<Spawn>().SpawnDroppedItem();
GameObject.Destroy(child.gameObject);
}
}
}