void OnSlotInitialize(object [] data)
    {
        preview = new SofaModulePrewiewModel();
        app.model.previewModule = preview;
        SofaModuleView view = (SofaModuleView)data [0];;

        view.pmodel  = preview;
        preview.view = view;
    }
    public SofaModuleModel Duplicate()
    {
        GameObject copyObj = GameObject.Instantiate(view.gameObject, view.transform.position, view.transform.rotation);

        copyObj.layer = LayerMask.NameToLayer("SofaModule");

        SofaModuleView copyView = copyObj.GetComponent <SofaModuleView>();

        copyView.model = new SofaModuleModel(copyView);

        return(copyView.model);
    }
 public SofaModulePrewiewModel(SofaModuleView view = null) : base(view)
 {
 }
Exemplo n.º 4
0
 public SofaModuleModel(SofaModuleView view)
 {
     this.view = view;
 }