UIItemSlot.OnDrop C# (CSharp) Method

OnDrop() public method

Stop dragging the item.
public OnDrop ( GameObject go ) : void
go GameObject
return void
    void OnDrop(GameObject go)
    {
        Debug.Log("OnDrop");
        InvGameItem item = ReplaceExisting(mDraggedItem);

        if (mDraggedItem == item && !item.combineSuccessful) NGUITools.PlaySound(errorSound);
        else if (item != null)
        {
            if (item.combineSuccessful)
            {
                NGUITools.PlaySound(combineSound);
                item.combineSuccessful = false;
                mDraggedItem = null;
                UpdateCursor();
                Debug.Log("combine cleanup");
                return;
            }
            else
                NGUITools.PlaySound(grabSound);
        }
        else NGUITools.PlaySound(placeSound);

        mDraggedItem = item;
        UpdateCursor();
    }