// Use this for initialization void Awake() { setAllowedOperations(); if (Statics.levelType.Equals("all") || (Statics.levelType.Equals("sphere") || Statics.levelType.Equals("torus"))) { if (GameObject.Find("Lines") != null) { GameObject.Find("Lines").SetActive(false); GameObject.Find("Dots").SetActive(false); GameObject.Find("Homotopies").SetActive(false); } GameObject.Find("Circle").SetActive(false); GameObject.Find("Rectangle").SetActive(false); GameObject.Find("DeleteObstacle").SetActive(false); GameObject.Find("DeleteAll").SetActive(false); GameObject.Find("Exit2").SetActive(false); } else { GameObject.Find("Lines").SetActive(false); GameObject.Find("Dots").SetActive(false); GameObject.Find("Homotopies").SetActive(false); GameObject.Find("Exit1").SetActive(false); GameObject.Find("Circle").SetActive(false); GameObject.Find("Rectangle").SetActive(false); GameObject.Find("DeleteObstacle").SetActive(false); GameObject.Find("DeleteAll").SetActive(false); GameObject.Find("Save").SetActive(false); GameObject.Find("Draw").SetActive(false); GameObject.Find("Delete").SetActive(false); } if (Statics.levelType.Equals("dots")) { GameObject.Find("Windung").SetActive(false); } levelNumber = Statics.nextSceneNumber; pathFactory = new PathFactory(pathMat); homotopyFactory = new HomotopyFactory(pathMat, homotopyMat); setColors(); if (Statics.showingAlgebra) { homTextObj = Instantiate(textPrefab); homTextObj.transform.SetParent(canvas.transform); var position = new Vector3(Screen.width / 2, Screen.height - 50); homTextObj.transform.position = position; } LoadObjects(Statics.nextSceneNumber); trailMat.SetColor("_Color", GetNextColor(MType.Path)); }
// Use this for initialization void Awake() { Statics.folderPath = Application.streamingAssetsPath + "\\"; setAllowedOperations(); if (Statics.levelType.Equals("all") || (Statics.levelType.Equals("sphere") || Statics.levelType.Equals("torus"))) { GameObject.Find("Lines").SetActive(false); GameObject.Find("Dots").SetActive(false); GameObject.Find("Homotopies").SetActive(false); GameObject.Find("Circle").SetActive(false); GameObject.Find("Rectangle").SetActive(false); GameObject.Find("Exit2").SetActive(false); } else { GameObject.Find("Lines").SetActive(false); GameObject.Find("Dots").SetActive(false); GameObject.Find("Homotopies").SetActive(false); GameObject.Find("Exit1").SetActive(false); GameObject.Find("Circle").SetActive(false); GameObject.Find("Rectangle").SetActive(false); GameObject.Find("Save").SetActive(false); GameObject.Find("Draw").SetActive(false); GameObject.Find("Delete").SetActive(false); } if (Statics.levelType.Equals("dots")) { GameObject.Find("Windung").SetActive(false); } levelNumber = Statics.nextSceneNumber; pathFactory = new PathFactory(pathMat, arrowPrefab); homotopyFactory = new HomotopyFactory(pathMat, homotopyMat); setColors(); homTextObj = Instantiate(textPrefab); homTextObj.transform.SetParent(canvas.transform); var position = new Vector3(Screen.width / 2, Screen.height - 50); homTextObj.transform.position = position; LoadObjects(Statics.nextSceneNumber); trailMat.SetColor("_Color", GetRandomColor()); }