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