StorageAreaPlugin.MoveItem
Declaration#
public bool MoveItem(GDTKItem item, Int32 destColumn, Int32 destRow, Action beforeMove, Action afterMove)Parameters#
| Name | Description |
|---|---|
| item | Item to move |
| destColumn | Destination column |
| destRow | Destination row |
| beforeMove | Action to call before move |
| afterMove | Action to call after move |
Description#
Attempt to move an item to a new location
Usage#
Example
using NullSave.GDTK.Inventory;using UnityEngine;
public class CodeSample : MonoBehaviour{
public void Example(StorageAreaPlugin target, GDTKItem other) { bool result = target.MoveItem(other, 0, 2, BeforeMove, AfterMove); }
private void BeforeMove() { Debug.Log("About to move item"); }
private void AfterMove() { Debug.Log("Item moved"); }
}