private void UsePickup()
    {
        GameObject pickupObject = Resources.Load <GameObject>("Drops/" + inventoryArray[selectedSlotID].ToString());

        BasePickup basePickup = pickupObject.GetComponent <BasePickup>();

        basePickup.UsePickup();
    }
Esempio n. 2
0
    public bool PickupCollectable()
    {
        if (targetObject != null)
        {
            BasePickup pickup = targetObject.GetComponent <BasePickup>();

            if (pickup != null)
            {
                Pickup(pickup);
                return(true);
            }
        }
        return(false);
    }
Esempio n. 3
0
 public void Pickup(BasePickup pickup)
 {
     pickup.Pickup(this);
 }