示例#1
0
    public void DropItem(int items)
    {
        if (shuffleItemCount >= 3)
        {
            GameManager.SetMsgText("이미 최대갯수만큼 드랍했어요", 2f);
            return;
        }

        if (count[items] <= 0)
        {
            GameManager.SetMsgText("해당 아이템은 모두 소진했어요", 2f);
            return;
        }

        Item item = dropItems[shuffleItemCount];

        item.gameObject.SetActive(true);

        item.SetItem((Items)items);
        item.DropItem(dropPoints.position.x);
        shuffleItemCount++;
        count[items]--;

        itemPanel.RefreshItemCount(count);
    }