예제 #1
0
    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);
    }