예제 #1
0
    public void removeObj(InventoryObj obj)
    {
        for (int i = 0; i < inventory.Count; i++)
        {
            if (inventory[i].ReturnID() == obj.ReturnID())
            {
                inventory.Remove(inventory[i]);

                break;
            }
        }
    }
예제 #2
0
    public bool doesContain(InventoryObj obj)
    {
        bool result = false;

        for (int i = 0; i < inventory.Count; i++)
        {
            if (inventory[i].ReturnID() == obj.ReturnID())
            {
                result = true;
            }
        }

        return(result);
    }