Ejemplo n.º 1
0
 /// <summary>
 /// 创建最终药水对象
 /// </summary>
 /// <param name="factory">抽象工厂具体对象</param>
 public void MakeProduct(AbstractFactory factory)
 {
     _bottle = factory.CreateBottle();
     _cap    = factory.CreateCap();
     Console.WriteLine("准备英雄需要的瓶子和瓶盖。");
     _bottle.ShowInfo();
     _cap.ShowInfo();
     Console.WriteLine("开始往瓶子了灌入隐形药水,然后封上瓶盖。");
 }