Ejemplo n.º 1
0
    private IEnumerator DelayCollectCompleted(Item item)
    {
        eventSystem.SetActive(false);
        yield return(new WaitForSeconds(1f / 3f));

        result.SetItem(item);
        yield return(new WaitForSeconds(1.5f));

        Chara chara = Instantiate(this.chara, inventory);

        chara.item    = item;
        chara.crafter = this;
        itemButtons.Add(item, chara);
        chara.Complete();
        for (int i = 0; i < 4; i++)
        {
            slots[i].Clear();
        }
        eventSystem.SetActive(true);
        if (!golded)
        {
            gold.Activate();
        }
        golded = true;
        yield return(new WaitForSeconds(0.5f));

        CheckWin();
    }