//6 The client should call a production method of a Director object to begin the construction process. public void ClientCode(Director director, Builder builder) { Debug.Log("Standart basic product:"); director.buildMinimalViableProduct(); Debug.Log(builder.GetProduct().ListParts()); Debug.Log("Standart full featured product:"); director.buildFullFeaturedProduct(); Debug.Log(builder.GetProduct().ListParts()); Debug.Log("Custom product:"); builder.BuildPartA(); builder.BuildPartC(); Debug.Log(builder.GetProduct().ListParts()); }
// Builder uses a complex series of steps public void Construct(Builder builder) { builder.BuildPartA(); builder.BuildPartB(); }
public void buildMinimalViableProduct() { builder.BuildPartA(); }