示例#1
0
    public bool IsObtained()
    {
        bool isObtained = false;

        if (owner != null)
        {
            ItemBox box = owner.GetComponentInParent <ItemBox>();

            if (!box.IsFull())
            {
                box.ObtainItem(itemID);
                isObtained = true;
            }
            else
            {
                owner = null;
            }
        }

        return(isObtained);
    }