Skip to main content

StorageAreaPlugin.HandleDrop

Declaration#

public virtual void HandleDrop(GDTKItem item, Int32 count, Boolean& handled)

Parameters#

NameDescription
itemItem to drop
countCount to drop
handledSet true if handled by this plugin

Description#

Handle dropping item

Usage#

using NullSave.GDTK.Inventory;using UnityEngine;
public class Example : MonoBehaviour{
    public void ExampleMethod(Inventory target)    {        int count = 999;        bool handled = false;        foreach(InventoryPluginWrapper wrapper in target.plugins)        {            wrapper.plugin.HandleDrop(InventoryDatabase.instance.items[0], count, ref handled);            if(handled)            {                Debug.Log("Drop handled.");                return;            }        }
        Debug.Log("Drop not handled by plugins");    }}