StorageAreaPlugin.HandleDrop
Declaration#
public virtual void HandleDrop(GDTKItem item, Int32 count, Boolean& handled)Parameters#
| Name | Description |
|---|---|
| item | Item to drop |
| count | Count to drop |
| handled | Set 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"); }}