Esempio n. 1
0
 public void buyAttempt(Grid grid, Button button, BaseUnitPackage unit, Enums.Piece piece)
 {
     if (!UnitShop.BuyUnit(unit, piece))
     {
         return;
     }
     _unitShopButtonsUI.DisableGridAndButton(grid, button);
 }
Esempio n. 2
0
 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;
 }