IEnumerator TriggerStudentReactionFourOtherStudentsReaction() { kidMaxim.StopMyRandomLookingAnimations(); kidMaxim.SetMyMood(MoodIndicator.Middle); //kidMaxim.StopLookingAtTabletAndWrittingAnimations(); string studentTextToSpeak = "Juhu! Spielen!"; // SpeechManager.Instance.StartTalking(teacherTextToSpeak); //if (gamePlayManager.LOG_ENABLED) SpeechManager.Instance.StartTalking(studentTextToSpeak); MaximAudio2.Play(); kidMaxim.StartLookingAtTabletAndWrittingAnimations(); yield return(new WaitForSeconds(9.0f)); gamePlayManager.studentsActions[1].SetMyMood(MoodIndicator.Middle); // students from table 4 gamePlayManager.studentsActions[17].SetMyMood(MoodIndicator.Middle); gamePlayManager.studentsActions[3].SetMyMood(MoodIndicator.Middle); gamePlayManager.studentsActions[4].SetMyMood(MoodIndicator.Middle); //gamePlayManager.studentsActions[16].SetMyMood(MoodIndicator.Middle); kidMaxim.SetMyMood(MoodIndicator.Middle); gamePlayManager.studentsActions[9].SetMyMood(MoodIndicator.Middle); // students from table 3 gamePlayManager.studentsActions[15].SetMyMood(MoodIndicator.Middle); gamePlayManager.studentsActions[7].SetMyMood(MoodIndicator.Middle); gamePlayManager.studentsActions[6].SetMyMood(MoodIndicator.Middle); gamePlayManager.studentsActions[5].SetMyMood(MoodIndicator.Middle); gamePlayManager.studentsActions[1].StopLookingAtTabletAndWrittingAnimations(); // students from table 1 & 2 gamePlayManager.studentsActions[17].StopLookingAtTabletAndWrittingAnimations(); gamePlayManager.studentsActions[3].StopLookingAtTabletAndWrittingAnimations(); gamePlayManager.studentsActions[4].StopLookingAtTabletAndWrittingAnimations(); //gamePlayManager.studentsActions[16].StopLookingAtTabletAndWrittingAnimations(); //kidMaxim.StopLookingAtTabletAndWrittingAnimations(); gamePlayManager.studentsActions[9].StopLookingAtTabletAndWrittingAnimations(); gamePlayManager.studentsActions[15].StopLookingAtTabletAndWrittingAnimations(); gamePlayManager.studentsActions[7].StopLookingAtTabletAndWrittingAnimations(); gamePlayManager.studentsActions[6].StopLookingAtTabletAndWrittingAnimations(); gamePlayManager.studentsActions[5].StopLookingAtTabletAndWrittingAnimations(); yield return(new WaitForSeconds(1.0f)); gamePlayManager.studentsActions[1].LookAtSomeone(kidMaxim.gameObject.transform); gamePlayManager.studentsActions[17].LookAtSomeone(kidMaxim.gameObject.transform); gamePlayManager.studentsActions[3].LookAtSomeone(kidMaxim.gameObject.transform); gamePlayManager.studentsActions[4].LookAtSomeone(kidMaxim.gameObject.transform); //gamePlayManager.studentsActions[16].LookAtSomeone(kidMaxim.gameObject.transform); gamePlayManager.studentsActions[9].LookAtSomeone(kidMaxim.gameObject.transform); gamePlayManager.studentsActions[15].LookAtSomeone(kidMaxim.gameObject.transform); gamePlayManager.studentsActions[7].LookAtSomeone(kidMaxim.gameObject.transform); gamePlayManager.studentsActions[6].LookAtSomeone(kidMaxim.gameObject.transform); gamePlayManager.studentsActions[5].LookAtSomeone(kidMaxim.gameObject.transform); yield return(new WaitForSeconds(1.0f)); kidMaxim.LookAtSomeone(kidMaxim.GetComponent <StudentAction>().chairPoint.gameObject.transform.GetComponentInChildren <StudyMaterialType>().Tablet.transform); yield return(new WaitForSeconds(2.0f)); StartCoroutine(TriggerMaximToDistractNextKid()); for (int i = 0; i < gamePlayManager.studentsActions.Count; i++) { if (gamePlayManager.studentsActions[i] != kidMaxim || gamePlayManager.studentsActions[i] != gamePlayManager.studentsActions[1]) { yield return(new WaitForSeconds(Random.Range(1.0f, 3.0f))); gamePlayManager.studentsActions[i].StartLookingAtTabletAndWrittingAnimations(); //gamePlayManager.studentsActions[i].SetMyMood(MoodIndicator.Good); } } }