IEnumerator TriggerStudentReactionThree() { //Student mumbling low audioInClass.volume = 0.1f; audioInClass.Play(); KidHanna.FindMyChair("Chair", ChairNoLena); KidLena.FindMyChair("Chair", ChairNoHanna); KidHanna.FindMyNeighbour(); KidLena.FindMyNeighbour(); KidJannik.FindMyNeighbour(); KidJannik.myNeighbourStudent = KidHanna; for (int i = 0; i < gamePlayManager.studentsActions.Count; i++) { gamePlayManager.studentsActions[i].StopLookAtSomeone(); gamePlayManager.studentsActions[i].StopMyRandomLookingAnimations(); gamePlayManager.studentsActions[i].studentAnimation.ResetAllAnim(); gamePlayManager.studentsActions[i].SetMyMood(MoodIndicator.Good); } yield return(new WaitForSeconds(1.0f)); for (int i = 0; i < SR2StudentsInPair_1.Length; i++) { StartCoroutine(SR3StudentWalkTowardsFrontDesk(SR2StudentsInPair_1[i], 1)); // sit in different seats .. add this } for (int i = 0; i < SR2StudentsInPair_2.Length; i++) { StartCoroutine(SR3StudentWalkTowardsFrontDesk(SR2StudentsInPair_2[i], 2)); } //Student mumbling middle audioInClass.volume = 0.3f; audioInClass.Play(); yield return(new WaitForSeconds(18.0f)); GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMovement>().LookToPlace(true, tableFourPoint); KidJannik.studentAnimation.MB33_WorkOnSheets(false); KidJannik.myNeighbourStudent.studentAnimation.MB33_WorkOnSheets(false); KidJannik.SetMyMood(MoodIndicator.Bad); KidJannik.myNeighbourStudent.SetMyMood(MoodIndicator.Bad); KidJannik.studentAnimation.MB9_LookAround(true); KidJannik.myNeighbourStudent.studentAnimation.MB9_LookAround(true); yield return(new WaitForSeconds(4.0f)); KidJannik.studentAnimation.MB33_WorkOnSheets(true); KidJannik.myNeighbourStudent.studentAnimation.MB33_WorkOnSheets(true); }
IEnumerator SRTwoLoop(StudentAction stu) { yield return(new WaitForSeconds(UnityEngine.Random.Range(0.1f, 0.5f))); stu.studentAnimation.MB9_LookAround(true); stu.SetMyMood(MoodIndicator.Middle); }
IEnumerator SR3MaximActivity(StudentAction stu) { stu.SetMyMood(MoodIndicator.Middle); yield return(new WaitForSeconds(3f)); stu.studentAnimation.RaiseHand(true); //stu.LookAtSomeone(GameObject.FindGameObjectWithTag("Player").transform); }
IEnumerator StudentsWithBlueBooksGetBored(StudentAction stu) { stu.studentAnimation.MB33_WorkOnSheets(false); stu.SetMyMood(MoodIndicator.Middle); yield return(new WaitForSeconds(UnityEngine.Random.Range(1f, 5f))); stu.studentAnimation.MB9_LookAround(true); }
IEnumerator R4Action(StudentAction stu, int i) { yield return(new WaitForSeconds(Random.Range(0.1f, 3f))); if (i < 7) { stu.LookAtSomeone(stu.chairPoint.gameObject.GetComponentInChildren <StudyMaterialType>().GetStudyMaterial(StudyMaterial.WorkSheet).transform); stu.SetMyMood(MoodIndicator.Middle); } else if (i >= 7 && i < 10) { stu.LookAtWindowRoutine(); stu.SetMyMood(MoodIndicator.Middle); } else //if (i >= 10 && i < 16) { stu.studentAnimation.VI11_TalkToFriendsLeftAndRight(); } }
private IEnumerator JannikActivity(StudentAction stu) { yield return(null); stu.SetMyMood(MoodIndicator.Bad); stu.studentAnimation.MB9_LookAround(true); if (stu.myNeighbourStudent != null) { stu.myNeighbourStudent.LookAtSomeone(stu.chairPoint.gameObject.transform.GetComponentInChildren <StudyMaterialType>().Tablet.transform); } }
IEnumerator TriggerStudentReactionTwo() { teacherMumblingAudio.Play(); yield return(new WaitForSeconds(1f)); for (int i = 0; i < gamePlayManager.studentsActions.Count; i++) { gamePlayManager.studentsActions[i].StopLookAtSomeone(); gamePlayManager.studentsActions[i].StopMyRandomLookingAnimations(); gamePlayManager.studentsActions[i].studentAnimation.ResetAllAnim(); if (gamePlayManager.studentsActions[i].ESEStudent || gamePlayManager.studentsActions[i].LEStudent) // if student is SN { gamePlayManager.studentsActions[i].SetMyMood(MoodIndicator.Middle); StartCoroutine(SNStudentsLooksOutsideAndAroundWithDelay(gamePlayManager.studentsActions[i])); } else { gamePlayManager.studentsActions[i].LookAtSomeone(GameObject.FindGameObjectWithTag("Player").transform); } } yield return(new WaitForSeconds(3f)); for (int i = 0; i < gamePlayManager.studentsActions.Count; i++) { gamePlayManager.studentsActions[i].SetMyMood(MoodIndicator.Good); if (i == 0 || i == 1 || i == 2) // if students are 1,2 or 3 . assign 3 random students later { StartCoroutine(SNStudentsLooksOutsideAndAroundWithDelay(gamePlayManager.studentsActions[i])); } } kidJannik.SetMyMood(MoodIndicator.Middle); yield return(new WaitForSeconds(7f)); teacherMumblingAudio.Stop(); for (int i = 0; i < gamePlayManager.studentsActions.Count; i++) { gamePlayManager.studentsActions[i].StopLookAtSomeone(); gamePlayManager.studentsActions[i].StopMyRandomLookingAnimations(); gamePlayManager.studentsActions[i].studentAnimation.ResetAllAnim(); if (gamePlayManager.studentsActions[i] != kidJannik) { gamePlayManager.studentsActions[i].studentAnimation.MB33_WorkOnSheets(true); } else { gamePlayManager.studentsActions[i].studentAnimation.RaiseHandAndKeep(true); } } }
IEnumerator TriggerStudentReactionThree() { GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMovement>().MovePlayer(true, tableFourPoint); GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMovement>().LookToPlace(true, gamePlayManager.GetComponent <MainObjectsManager>().Table4); //Set Jannik's mood to Bad; set his neighbor's to Middle KidJannik.SetMyMood(MoodIndicator.Middle); for (int i = 0; i < StudentsInPair.Length; i++) { if (StudentsInPair[i] != KidJannik) { StartCoroutine(AllStudentsActivity(StudentsInPair[i])); } } //KidJannik.SetMyMood(MoodIndicator.Middle); yield return(new WaitForSeconds(0.5f)); //KidJannik.myNeighbourStudent.ChairNumber = 6; KidJannik.myNeighbourStudent.FindMyChair("Chair", 6); KidJannik.myNeighbourStudent.GoToAndSitInChair(); KidJannik.myNeighbourStudent.SetMyMood(MoodIndicator.Middle); KidJannik.LookAtSomeone(KidJannik.chairPoint.gameObject.transform.GetComponentInChildren <StudyMaterialType>().Tablet.transform); KidSimon.LookAtSomeone(KidSimon.chairPoint.gameObject.transform.GetComponentInChildren <StudyMaterialType>().Tablet.transform); KidJannik.myNeighbourStudent.LookAtSomeone(KidSimon.chairPoint.gameObject.transform.GetComponentInChildren <StudyMaterialType>().Tablet.transform); yield return(new WaitForSeconds(5f)); KidJannik.studentAnimation.MB33_WorkOnSheets(true); KidJannik.SetMyMood(MoodIndicator.Good); KidSimon.studentAnimation.MB33_WorkOnSheets(true); KidSimon.SetMyMood(MoodIndicator.Bad); KidJannik.myNeighbourStudent.studentAnimation.MB33_WorkOnSheets(true); yield return(new WaitForSeconds(3f)); KidSimon.LookAtSomeone(KidSimon.chairPoint.gameObject.transform.GetComponentInChildren <StudyMaterialType>().Tablet.transform); KidJannik.myNeighbourStudent.LookAtSomeone(KidSimon.chairPoint.gameObject.transform.GetComponentInChildren <StudyMaterialType>().Tablet.transform); yield return(new WaitForSeconds(3f)); KidSimon.studentAnimation.MB33_WorkOnSheets(true); KidJannik.myNeighbourStudent.studentAnimation.MB33_WorkOnSheets(true); yield return(new WaitForSeconds(3f)); }
IEnumerator TriggerStudentReactionOne() { GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMovement>().MovePlayer(true, tableFourPoint); GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMovement>().LookToPlace(true, gamePlayManager.GetComponent <MainObjectsManager>().Table4); //Set Jannik's mood to Bad KidJannik.SetMyMood(MoodIndicator.Bad); for (int i = 0; i < StudentsInPair.Length; i++) { if (StudentsInPair[i] != KidJannik) { StartCoroutine(AllStudentsActivity(StudentsInPair[i])); } } KidJannik.myNeighbourStudent.StopLookAtSomeone(); KidJannik.myNeighbourStudent.StopMyRandomLookingAnimations(); KidJannik.myNeighbourStudent.studentAnimation.ResetAllAnim(); yield return(new WaitForSeconds(1f)); KidJannik.LookAtNeighbourRoutine(); KidJannik.myNeighbourStudent.studentAnimation.VI11_TalkToFriendsLeftAndRight(); yield return(new WaitForSeconds(4f)); KidJannik.myNeighbourStudent.studentAnimation.VI11_TalkToFriendsStop(); //Jannik's mood turns Good after neighbor stops talking KidJannik.SetMyMood(MoodIndicator.Good); KidJannik.LookAtNeighbourRoutineStop(); KidJannik.LookAtSomeone(KidJannik.chairPoint.gameObject.transform.GetComponentInChildren <StudyMaterialType>().Tablet.transform); KidJannik.myNeighbourStudent.LookAtSomeone(KidJannik.chairPoint.gameObject.transform.GetComponentInChildren <StudyMaterialType>().Tablet.transform); yield return(new WaitForSeconds(3f)); KidJannik.studentAnimation.MB33_WorkOnSheets(true); KidJannik.myNeighbourStudent.studentAnimation.MB33_WorkOnSheets(true); }
IEnumerator LeanToStudent(StudentAction s) { s.studentAnimation.ResetAllAnim(); s.studentAnimation.MB30_PeepToSideLeftOrRight(true); yield return(new WaitForSeconds(4.5f)); s.studentAnimation.MB30_PeepToSideLeftOrRight(false); yield return(new WaitForSeconds(UnityEngine.Random.Range(0.8f, 2f))); s.studentAnimation.MB30_PeepToSideLeftOrRight(true); yield return(new WaitForSeconds(4.5f)); s.studentAnimation.MB30_PeepToSideLeftOrRight(false); yield return(new WaitForSeconds(UnityEngine.Random.Range(0.8f, 2f))); s.studentAnimation.MB30_PeepToSideLeftOrRight(true); yield return(new WaitForSeconds(4.5f)); s.studentAnimation.MB30_PeepToSideLeftOrRight(false); yield return(new WaitForSeconds(UnityEngine.Random.Range(0.8f, 2f))); s.SetMyMood(MoodIndicator.Middle); }
IEnumerator StudentMoodWithDelay(StudentAction stu, MoodIndicator mood, float delay) { yield return(new WaitForSeconds(delay)); stu.SetMyMood(mood); }
IEnumerator TriggerStudentReactionFour() { //set student mumbling to medium audioInClass.volume = 0.03f; audioInClass.Play(); //enable player to look around and move to support seeing all kids during SRs. GameObject.FindGameObjectWithTag("Player").GetComponent <RigidbodyFirstPersonController>().MoveAndLookLocked = false; for (int i = 0; i < gamePlayManager.studentsActions.Count; i++) { gamePlayManager.studentsActions[i].StopLookAtSomeone(); gamePlayManager.studentsActions[i].StopMyRandomLookingAnimations(); gamePlayManager.studentsActions[i].studentAnimation.ResetAllAnim(); } KidMaxim.FindMyChair("Chair", 15); yield return(new WaitForSeconds(1.0f)); KidMaxim.GoToAndSitInChair(); for (int i = 0; i < mainObjectManager.studentsAtTable1.Count; i++) { mainObjectManager.studentsAtTable1[i].studentAnimation.VI7_TalkToFriendsLeftAndRight(); //StartCoroutine(StudentMoodWithDelay(mainObjectManager.studentsAtTable1[i], MoodIndicator.Middle,5f) ); } //set student mumbling to high audioInClass.volume = 0.08f; audioInClass.Play(); for (int i = 0; i < mainObjectManager.studentsAtTable2.Count; i++) { mainObjectManager.studentsAtTable2[i].studentAnimation.MB33_WorkOnSheets(true); yield return(new WaitForSeconds(0.5f)); //StartCoroutine(StudentMoodWithDelay(mainObjectManager.studentsAtTable2[i], MoodIndicator.Bad, 5f)); } for (int i = 0; i < mainObjectManager.studentsAtTable3.Count; i++) { mainObjectManager.studentsAtTable3[i].studentAnimation.MB33_WorkOnSheets(true); yield return(new WaitForSeconds(0.5f)); //StartCoroutine(StudentMoodWithDelay(mainObjectManager.studentsAtTable3[i], MoodIndicator.Middle, 10f)); } for (int i = 0; i < mainObjectManager.studentsAtTable4.Count; i++) { mainObjectManager.studentsAtTable4[i].studentAnimation.MB33_WorkOnSheets(true); yield return(new WaitForSeconds(0.5f)); //StartCoroutine(StudentMoodWithDelay(mainObjectManager.studentsAtTable4[i], MoodIndicator.Middle, 10f)); } yield return(new WaitForSeconds(1.0f)); //audioInClass.volume = 0.05f; //yield return new WaitForSeconds(6.0f); //audioInClass.volume = 0.08f; //yield return new WaitUntil((() => KidMaxim.reachedSpot)); KidMaxim.SetMyMood(MoodIndicator.Good); KidMaxim.studentAnimation.ResetAllAnim(); KidMaxim.studentAnimation.VI7_TalkToFriendsLeftAndRight(); for (int i = 0; i < mainObjectManager.studentsAtTable1.Count; i++) { mainObjectManager.studentsAtTable1[i].SetMyMood(MoodIndicator.Middle); } //audioInClass.volume = 0.08f; yield return(new WaitForSeconds(3.0f)); audioInClass.volume = 0.14f; for (int i = 0; i < mainObjectManager.studentsAtTable1.Count; i++) { mainObjectManager.studentsAtTable1[i].SetMyMood(MoodIndicator.Bad); } //nearby students get upset at the increased noise for (int i = 0; i < mainObjectManager.studentsAtTable2.Count; i++) { mainObjectManager.studentsAtTable2[i].SetMyMood(MoodIndicator.Middle); yield return(new WaitForSeconds(UnityEngine.Random.Range(0.1f, 0.9f))); mainObjectManager.studentsAtTable2[i].SetMyMood(MoodIndicator.Bad); yield return(new WaitForSeconds(UnityEngine.Random.Range(0.1f, 1.5f))); StartCoroutine(GetUpset(mainObjectManager.studentsAtTable2[i])); } for (int i = 0; i < mainObjectManager.studentsAtTable3.Count; i++) { mainObjectManager.studentsAtTable3[i].SetMyMood(MoodIndicator.Middle); yield return(new WaitForSeconds(UnityEngine.Random.Range(0.1f, 0.9f))); mainObjectManager.studentsAtTable3[i].SetMyMood(MoodIndicator.Bad); yield return(new WaitForSeconds(UnityEngine.Random.Range(0.1f, 1.5f))); StartCoroutine(GetUpset(mainObjectManager.studentsAtTable3[i])); } for (int i = 0; i < mainObjectManager.studentsAtTable4.Count; i++) { mainObjectManager.studentsAtTable4[i].SetMyMood(MoodIndicator.Middle); yield return(new WaitForSeconds(UnityEngine.Random.Range(0.1f, 0.9f))); mainObjectManager.studentsAtTable4[i].SetMyMood(MoodIndicator.Bad); yield return(new WaitForSeconds(UnityEngine.Random.Range(0.1f, 1.5f))); StartCoroutine(GetUpset(mainObjectManager.studentsAtTable4[i])); } //GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerMovement>().MovePlayer(true, mainObjectManager.Table1MoveToPoint); //GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerMovement>().LookToPlace(true, mainObjectManager.Table1); }
// SAc: Edit, We have removed Julia from the group of kids as she is not in the 9 year old list as per configuration, so all the index numbers will have to be modified as per this change where it is needed public void MainActionOne() { kidLeonie.SetMyMood(MoodIndicator.Middle); kidLeonie.ShowMyMoodNow(true); StartCoroutine(ActivateMainActionOne()); }
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); } } }
void SR4HighAcheivingStudentsEvent(StudentAction stu) { stu.studentAnimation.MB33_WorkOnSheets(false); stu.SetMyMood(MoodIndicator.Middle); stu.studentAnimation.MB9_LookAround(true); }
IEnumerator TriggerSRInitialActions() { // move Player to their original position and turn towards original rotation. GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMovement>().LookToPlayer(true, gamePlayManager.GetComponent <MainObjectsManager>().Table4); GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMovement>().MovePlayer(true, gamePlayManager.GetComponent <MainObjectsManager>().TeacherInFrontOfClassPoint); /* * for (int i = 0; i < gamePlayManager.studentsActions.Count; i++) * { * gamePlayManager.studentsActions[i].studentAnimation.ResetCurrentAnim(); * if (gamePlayManager.studentsActions[i] != kidJannik && gamePlayManager.studentsActions[i] != kidMaxim) gamePlayManager.studentsActions[i].SetMyMood(MoodIndicator.Good); * gamePlayManager.studentsActions[i].StopMyRandomLookingAnimations(); * } */ kidJannik.StopLookAtSomeone(); kidMaxim.StopLookAtSomeone(); kidJannik.FindMyChair("Chair", jannikOriginalChairNumber); kidMaxim.FindMyChair("Chair", maximOriginalChairNumber); kidJannik.GoToAndSitInChair(); kidMaxim.GoToAndSitInChair(); kidJannik.studentAnimation.WalkingToStandUpIdle(false); kidMaxim.studentAnimation.WalkingToStandUpIdle(false); jannikNewChair.ShowStudyMaterial(StudyMaterial.PencilBox, false); jannikNewChair.ShowStudyMaterial(StudyMaterial.WorkSheet, false); jannikNewChair.ShowStudyMaterial(StudyMaterial.Book, false); maximNewChair.ShowStudyMaterial(StudyMaterial.PencilBox, false); maximNewChair.ShowStudyMaterial(StudyMaterial.WorkSheet, false); maximNewChair.ShowStudyMaterial(StudyMaterial.Book, false); jannikAndMaximSat = false; StartCoroutine(TriggerCheckJannikAndMaximSat()); yield return(new WaitUntil(() => jannikAndMaximSat)); jannikOriginalChair.ShowStudyMaterial(StudyMaterial.PencilBox); jannikOriginalChair.ShowStudyMaterial(StudyMaterial.WorkSheet); jannikOriginalChair.ShowStudyMaterial(StudyMaterial.Book); maximOriginalChair.ShowStudyMaterial(StudyMaterial.PencilBox); maximOriginalChair.ShowStudyMaterial(StudyMaterial.WorkSheet); maximOriginalChair.ShowStudyMaterial(StudyMaterial.Book); //yield return new WaitForSeconds(1f); kidJannik.studentAnimation.MB26_FoldHands(true); kidMaxim.studentAnimation.MB26_FoldHands(true); kidJannik.LookAtSomeone(kidMaxim.transform); kidMaxim.LookAtSomeone(kidJannik.transform); kidJannik.SetMyMood(MoodIndicator.Bad); kidMaxim.SetMyMood(MoodIndicator.Bad); yield return(new WaitUntil(() => !GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMovement>().isMove)); foreach (StudentAction studentAction in gamePlayManager.studentsActions) { if (studentAction != kidJannik && studentAction != kidMaxim) { studentAction.SetMyMood(MoodIndicator.Good); } studentAction.ShowMyMoodNow(true); studentAction.StartMyRandomLookingOrWrittingAnimations(); yield return(new WaitForSeconds(Random.Range(0.1f, 0.3f))); } yield return(new WaitForSeconds(0.5f)); }