Exemple #1
0
    // Use this for initialization
    void Start()
    {
        boxProduct = new BoxProductSelector();
        GameObject   box          = Instantiate <GameObject>(boxPrefab);
        BoxComponent boxComponent = box.GetComponent <BoxComponent>();

        str_boxProduct = boxProduct.GetSuitableBoxProduct(boxComponent.mySize);
        boxComponent.InitializeBox(str_boxProduct);
    }
Exemple #2
0
 public void InitializeBox(BoxProductSelector.Str_BoxProduct boxProduct)
 {
     myProduct = boxProduct.product;
     this.GetComponentInChildren <MeshFilter>().mesh = boxProduct.boxMesh;
 }