public void Initialize(GameObject hintButton) { this.hintButton = hintButton; studentActivityController = gameObject.GetComponent<StudentActivityController> (); sound_out_word = InstructionsAudio.instance.soundOutTheWord; }
// Use this for initialization void Start() { global = this; sessionParametersOB = GameObject.Find ("SessionParameters"); screenMode = sessionParametersOB.GetComponent<SessionsDirector> ().IsScreenMode (); if (screenMode) { arduinoLetterInterfaceG0.SetActive (false); uniduinoG0.SetActive (false); } else { //tangible mode; activate the arduino unity interface and uniduino objects. arduinoLetterInterface = arduinoLetterInterfaceG0.GetComponent<ArduinoUnityInterface> (); arduinoLetterInterfaceG0.SetActive (true); arduinoLetterInterface.Initialize (); uniduinoG0.SetActive (true); uniduinoG0.GetComponent<Uniduino.Arduino> ().Connect (); } totalLengthOfUserInputWord = numOnscreenLetterSpaces; arduinoLetterController = arduinoLetterControllerGO.GetComponent<ArduinoLetterController> (); arduinoLetterController.Initialize (0, numOnscreenLetterSpaces - 1, arduinoLetterInterface); wordHistoryController = wordHistoryControllerGO.GetComponent<WordHistoryController> (); wordHistoryController.Initialize (totalLengthOfUserInputWord); checkedWordImageController = checkedWordImageControllerGO.GetComponent<CheckedWordImageController> (); foreach (PhonoBlocksController c in Resources.FindObjectsOfTypeAll<PhonoBlocksController>()) c.UserInputRouter = global; hintButtonGO.SetActive (false); if (sessionParametersOB != null) { sessionManager = sessionParametersOB.GetComponent<SessionsDirector> (); if (SessionsDirector.DelegateControlToStudentActivityController) { studentActivityControllerGO = sessionManager.studentActivityControllerOB; studentActivityController = studentActivityControllerGO.GetComponent<StudentActivityController> (); studentActivityController.Initialize (hintButtonGO, arduinoLetterController); userStarControllerGO.SetActive (true); userStarController = userStarControllerGO.GetComponent<UserStarGridController> (); userStarController.Initialize (); } else { replayInstructionsButton.SetActive (false); userStarControllerGO.SetActive (false); } } }