Example #1
0
    public void PickUpItem()
    {
        am.ac.animator.SetTrigger("pickUp");
        ItemOnGround itemOnGround = overlapEcastms[0].gameObject.GetComponent <ItemOnGround>();

        itemOnGround.OnAction();

        am.sfxm.PickUp();

        List <ItemEnum> items  = itemOnGround.items;
        List <int>      counts = itemOnGround.counts;

        for (int i = 0; i < items.Count; i++)
        {
            am.inventory.AddItem(Item.GetItem(items[i]), counts[i]);
        }
        am.ActorUIManager.ShowItemOnGround(items, counts);
    }