DropItem() public static method

Executes the Drop() method on the object passed if it exists in the inventory
public static DropItem ( object obj ) : void
obj object
return void
Esempio n. 1
0
 public void RemoveItem(int slot, bool dropping)
 {
     // restart die timer, if possible
     if (inventory[slot].GetComponent <Lifetime>())
     {
         inventory[slot].GetComponent <Lifetime>().born = Time.time;
     }
     if (dropping)
     {
         inventory.DropItem(slot);
     }
     else
     {
         inventory[slot] = null;
     }
 }