Beispiel #1
0
 public void BuyPart(ShoppingItem item)
 {
     if (moneyMng.Buy(item.Cost))
     {
         print("buy successful");
         inv.AddToInventory(item.PartName);
     }
 }
Beispiel #2
0
 public void Remove(GameObject part)
 {
     for (int i = 0; i < parts.Length; i++)
     {
         if (parts[i] == part)
         {
             invMng.AddToInventory(part.name, true);
             Destroy(part);
         }
     }
 }