public void GrabEvent(IGrabable handler, BaseEventData baseEvent) { animator.SetTrigger("DogPickup"); item = handler.getItemOnPickup(); handler.destroyItem(); dog.GrabbedItem = item; }
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(); } }