Exemplo n.º 1
0
    public void Reflash()
    {
        if (mItemDrop == null)
        {
            return;
        }

        //Clear();

        int i = 0;

        for (; i < mItemDrop.GetCount(); i++)
        {
            if (mItemList.Count <= i)
            {
                AddItem(mItemDrop.Get(i));
                mGrid.repositionNow = true;
            }
            else
            {
                SetItem(i, mItemDrop.Get(i));
            }
        }

        for (int j = i; j < mItemList.Count;)
        {
            RemoveItem(mItemList[j]);
        }

        if (mItemList.Count == 0)
        {
            Hide();
        }
    }
Exemplo n.º 2
0
    protected bool CanFetch(int index)
    {
        IItemDrop itemDrop = this as IItemDrop;

        if (index < 0 || index >= itemDrop.GetCount())
        {
            return(false);
        }
        return(playerPkg.package.CanAdd(itemDrop.Get(index)));
    }