Example #1
0
    // Use this for initialization
    void Start()
    {
        MyDirector       theDirector = new MyDirector();
        MyBuilderProduct product     = null;

        theDirector.Construct(new MyConBuilderA());
        product = theDirector.GetResult();
        product.ShowProduct();
    }
Example #2
0
 public void Construct(MyBuilder theBuilder)
 {
     m_Product = new MyBuilderProduct();
     theBuilder.BuildPart1(m_Product);
     theBuilder.BuildPart2(m_Product);
 }
Example #3
0
 public abstract void BuildPart2(MyBuilderProduct theProduct);
Example #4
0
 public override void BuildPart2(MyBuilderProduct theProduct)
 {
     theProduct.AddPart("BBBBB2222222222222222222");
 }
Example #5
0
 public override void BuildPart1(MyBuilderProduct theProduct)
 {
     theProduct.AddPart("BBBB11111111111111");
 }