override public void initRest() { skipInterval = true; roadPool = new List<GameObject>(); for (int i = 0; i < objAmount; ++i) { GameObject obj = (GameObject) Instantiate(rainbowRoadPrefab); obj.SetActive(false); roadPool.Add(obj); } npm = GetComponent<NormalPartsManager>(); gcm = GetComponent<GoldenCubeManager>(); cookieMeshes = new Mesh[npm.meshes.childCount]; int count = 0; foreach (Transform tr in npm.meshes) { cookieMeshes[count++] = tr.GetComponent<MeshFilter>().sharedMesh; } adjustForLevel(1); run(); }
override public void initRest() { skipInterval = true; gcm = GetComponent<GoldenCubeManager>(); partsMeshes = new Mesh[GetComponent<NormalPartsManager>().meshes.childCount]; int count = 0; foreach (Transform tr in GetComponent<NormalPartsManager>().meshes) { partsMeshes[count++] = tr.GetComponent<MeshFilter>().sharedMesh; } objNextPool = new List<GameObject>(); for (int i = 0; i < objAmount; ++i) { GameObject obj = (GameObject) Instantiate(objPrefab_next); obj.SetActive(false); obj.transform.parent = transform; objNextPool.Add(obj); } run(); }
protected override void initializeRest() { gcm = (GoldenCubeManager)objectsManager; mRenderer = GetComponent<Renderer>(); }