void ProcessUpdate(UpgradeData upgrade) { if (Stats.GetInstance.Score < upgrade.Cost) { return; } Stats.GetInstance.Score -= upgrade.Cost; upgrade.OnUnlock(upgrade); UpgradeAcquired[upgrade.Id] = true; Destroy(buttonGo[upgrade.Id]); }
void ProcessUpdate(UpgradeData upgrade) { if (Stats.GetInstance.Score < upgrade.Cost) { return; } Stats.GetInstance.Score -= upgrade.Cost; upgrade.OnUnlock(upgrade); UpgradeAcquired[upgrade.Id] = true; Destroy(buttonGo[upgrade.Id]); }