/*IEnumerator SR1Loop1Leonie(StudentAction stu) * { * yield return new WaitForSeconds(1f); * stu.LookAtSomeone(GameObject.FindGameObjectWithTag("Player").transform); * yield return new WaitForSeconds(1f); * stu.LookAtSomeone(GameObject.FindGameObjectWithTag("Player").transform); * yield return new WaitForSeconds(1f); * stu.LookAtSomeone(GameObject.FindGameObjectWithTag("Player").transform); * }*/ IEnumerator StudentWalkOutOfClass(StudentAction stu) { stu.studentAnimation.MB33_WorkOnSheets(false); //play iwo25 animation stu.chairPoint.gameObject.transform.GetComponentInChildren <StudyMaterialType>().Bag.SetActive(true); yield return(new WaitForSeconds(1f)); stu.chairPoint.gameObject.transform.GetComponentInChildren <StudyMaterialType>().NoteBook.SetActive(false); stu.chairPoint.gameObject.transform.GetComponentInChildren <StudyMaterialType>().Book.SetActive(false); yield return(new WaitForSeconds(1f)); stu.chairPoint.gameObject.transform.GetComponentInChildren <StudyMaterialType>().Bag.SetActive(false); yield return(new WaitForSeconds(1f)); stu.SetStudentBag(true); stu.StopLookAtSomeone(); stu.StopMyRandomLookingAnimations(); stu.studentAnimation.ResetAllAnim(); stu.InitiateGoToSpot(door.transform); // to go outside }