Exemple #1
0
    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());
    }
Exemple #2
0
 public override double cost()
 {
     return(beverage.cost() + .20);
 }
 public override double cost()
 {
     return(.10 + beverage.cost());
 }
Exemple #4
0
 public override double cost()
 {
     return(bev.cost() + MOCHA_COST);
 }
 public override double cost()
 {
     return(0.20f + beverage.cost());
 }
Exemple #6
0
 public override double cost()
 {
     return(PriceList.caramelPrice + beverage.cost());
 }
Exemple #7
0
 public override decimal cost()
 {
     return(.15m + _beverage.cost());
 }
 public override double cost()
 {
     return(beverage.cost() + 0.29);
 }
Exemple #9
0
 public override float cost()
 {
     return(beverage.cost() + 0.10f);
 }
Exemple #10
0
 public override double cost()
 {
     return(PriceList.soyPrice + beverage.cost());
 }
Exemple #11
0
 public override double cost()
 {
     return(Math.Round(beverage.cost() * (100 - PriceList.discount) / 100, 2));
 }