Ejemplo n.º 1
0
    private void OnTriggerEnter(Collider other)
    {
        var findingPickUpItem = other.GetComponent <IPickUpItem>();

        if (findingPickUpItem != null)
        {
            PickUpEvent?.Invoke(findingPickUpItem);
        }
    }
Ejemplo n.º 2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.tag.Equals("PickUp") && canPickUp)
     {
         PickUp    pickUpItem     = other.GetComponent <PickUp>();
         ItemGroup extraItemGroup = null;
         backpack.TryPutIn(pickUpItem.itemGroup, out extraItemGroup);
         PickUpEvent?.Invoke(this, new PickUpEventDate(pickUpItem, attrManager.faction));
     }
 }