private void SetupDemolishButton(AbstractBuildingTile tile, AbstractMarketManager manager) { int price = tile.GetCurrentFoundationData().DestructionCost; demolishText.text = price.ToString(); if (!CanAffort(price) || tile.HasBuilding) { BlockButton(btnDemolish, true); return; } BlockButton(btnDemolish, false); SetButton(btnDemolish, OnClick); void OnClick() { confirmDemolishPopup.ShowPopUp(OnConfirmDemolish); } void OnConfirmDemolish() { ReduceMoney(price); tile.RemoveFoundation(); manager.CloseMarket(); } }