void instantiateControllers() { aiController = GameObject.FindGameObjectWithTag("AIController").GetComponent <AIController>(); waypointController = GameObject.FindGameObjectWithTag("WaypointController").GetComponent <WaypointController>(); waypointController.createWaypoints(ammountOfWaypoints); aiController.createCars(ammountOfAi); guiController = GameObject.FindGameObjectWithTag("GUIController").GetComponent <GUIController>(); inGameGuiController = GameObject.FindGameObjectWithTag("GUIController").GetComponent <InGameGUIController>(); guiController.setProgram(ProgramObjectController.getProgram(), null); }
void setMajorCourses(string[] majorCourses) { string majorName = ProgramObjectController.getMajorName(); int index = 0; for (int i = 0; i < allCourses.GetLength(0); i++) { for (int j = 0; j < allCourses.GetLength(1); j++) { if (allCourses[i, j] == null && majorCourses[index] != null) { Debug.Log(i + " " + j + " " + index); Debug.Log(majorCourses[index]); index++; } } } playerAtWaypoint(); guiController.setProgram(ProgramObjectController.getProgram(), majorName); }