public void buyAttempt(Grid grid, Button button, BaseUnitPackage unit, Enums.Piece piece) { if (!UnitShop.BuyUnit(unit, piece)) { return; } _unitShopButtonsUI.DisableGridAndButton(grid, button); }
public void BuyUnitDef(Button button, BaseUnitPackage unit, Enums.Piece piece)//Buy unit if default piece is set { if (DefaultPieceSelector.GetDefaultPiece() == Enums.Piece.none) { return; } if (!UnitShop.BuyUnit(unit, piece)) { return; } button.Content = null; button.IsEnabled = false; }