public override bool SellUnit(ActionUnit sellUnit) { float price = GetSellPriceUnit(sellUnit); if (base.SellUnit(sellUnit)) { GoldAccount.ApplyAdd(price); return(true); } return(false); }
public override bool DeductGoldForShop() { if (GoldAccount.ApplyDeduct(GetShopPrice()) >= 0) { return(true); } else { MainMenuControl.Instance.ShowUserMessage(UserMessageManager.MES_GOLD_INVALID, 1f); GoldAccount.ApplyAdd(GetShopPrice()); return(false); } }