public CubeController(CubeScriptableObj cubedata) { GameObject instance = GameObject.Instantiate(cubedata.prefab); View = new CubeView(); //UI Model = new CubeModel(instance, cubedata); }
public CubeModel(GameObject prefab, CubeScriptableObj cubedata) { CubeSpeed = cubedata.speed; CubeTransform = prefab.transform; CubeTarget = cubedata.Target; CubeBox = prefab.gameObject.GetComponent <BoxCollider>(); }