示例#1
0
    public override bool SellUnit(ActionUnit sellUnit)
    {
        float price = GetSellPriceUnit(sellUnit);

        if (base.SellUnit(sellUnit))
        {
            GoldAccount.ApplyAdd(price);
            return(true);
        }
        return(false);
    }
示例#2
0
 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);
     }
 }