public void Buy() { if (_clickerComponent is Upgrade) { _clickerManager.BuyUpgrade(_clickerComponent as Upgrade); } else { _clickerManager.BuyBuilding(_clickerComponent as Building); } }
public void Buy() { if (_component is Upgrade) { _clickerManager.BuyUpgrade(Name.text); } else { _clickerManager.BuyBuilding(Name.text); } }