Esempio n. 1
0
 public void BuyItem()
 {
     if (scriptableShopItem.Cost <= shopManager.GetUnits())
     {
         shopManager.RemoveUnits(scriptableShopItem.Cost);
         shopManager.ItemBought(scriptableShopItem);
         scriptableShopItem.UnlockModule();
         Destroy(gameObject);
     }
 }