public void DebugBeverage() { //装饰者包装的 beverage2 = new Mocha(beverage2); beverage2 = new Mocha(beverage2); beverage2 = new Whip(beverage2); Debug.Log(beverage.GetDes() + " " + beverage.cost()); Debug.Log(beverage2.GetDes() + " " + beverage2.cost()); }
public override double cost() { return(beverage.cost() + .20); }
public override double cost() { return(.10 + beverage.cost()); }
public override double cost() { return(bev.cost() + MOCHA_COST); }
public override double cost() { return(0.20f + beverage.cost()); }
public override double cost() { return(PriceList.caramelPrice + beverage.cost()); }
public override decimal cost() { return(.15m + _beverage.cost()); }
public override double cost() { return(beverage.cost() + 0.29); }
public override float cost() { return(beverage.cost() + 0.10f); }
public override double cost() { return(PriceList.soyPrice + beverage.cost()); }
public override double cost() { return(Math.Round(beverage.cost() * (100 - PriceList.discount) / 100, 2)); }