Пример #1
0
 public void GrabEvent(IGrabable handler, BaseEventData baseEvent)
 {
     animator.SetTrigger("DogPickup");
     item = handler.getItemOnPickup();
     handler.destroyItem();
     dog.GrabbedItem = item;
 }
Пример #2
0
    private void pickup(IGrabable handler, BaseEventData eventData)
    {
        bool      temp;
        Inventory inventory;

        inventory = Inventory.instance;
        Item item;

        item = handler.getItemOnPickup();
        if (inventory != null)
        {
            temp = inventory.addItem(item);
            if (temp)
            {
                handler.destroyItem();
            }
        }
        else
        {
            handler.destroyItem();
        }
    }