Skip to main content

StorageAreaPlugin.MoveItem

Declaration#

public bool MoveItem(GDTKItem item, Int32 destColumn, Int32 destRow, Action beforeMove, Action afterMove)

Parameters#

NameDescription
itemItem to move
destColumnDestination column
destRowDestination row
beforeMoveAction to call before move
afterMoveAction 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");    }
}