Ejemplo n.º 1
0
    IEnumerator TriggerStudentReactioThree()
    {
        // Leonie crosses arms and looks at her box(mb41: box) for 7 seconds
        kidLeonie.studentAnimation.MB42_StandCrossArms(true);

        //set mood of table2 to Middle
        foreach (StudentAction sa in gamePlayManager.GetComponent <MainObjectsManager>().studentsAtTable2)
        {
            sa.SetMyMood(MoodIndicator.Middle);
        }

        yield return(new WaitForSeconds(7f));

        // IWO32 animation is not there, so just attaching the Worksheet to the kid's hand.

        kidLeonie.SetMyRightHandStudyMaterialsVisibilty(StudyMaterial.WorkSheet, true);
        yield return(new WaitForSeconds(1.0f));

        //returns to her seat (ma7)
        kidLeonie.studentAnimation.MB42_StandCrossArms(false);
        kidLeonie.TurnToPlayerOrObject(false);
        kidLeonie.StopLookAtSomeone();
        kidLeonie.GoToAndSitInChair();


        yield return(new WaitUntil(() => kidLeonie.studentAnimation.IsSittingNow));

        kidLeonie.SetMyRightHandStudyMaterialsVisibilty(StudyMaterial.WorkSheet, false);
        kidLeonie.chairPoint.gameObject.GetComponent <ChairDetails>().ShowStudyMaterial(StudyMaterial.WorkSheet, true);
        yield return(new WaitForSeconds(1f));

        //[observing kids resume working when Leonie sits down],
        foreach (StudentAction sa in gamePlayManager.GetComponent <MainObjectsManager>().studentsAtTable2)
        {
            sa.StopLookAtSomeone();
            sa.StopLookBetweenTwoPeopoleRoutine();
            sa.StartMyRandomLookingOrWrittingAnimations(2.5f, 4f, 2.5f, 5f);
            sa.SetMyMood(MoodIndicator.Good);
            yield return(new WaitForSeconds(Random.Range(0.1f, 0.4f)));
        }
        yield return(new WaitForSeconds(1f));

        // Leonie looks out to window

        kidLeonie.LookAtWindowRoutine();

        yield return(new WaitForSeconds(5f));

        kidLeonie.LookAtWindowRoutineStop();
        yield return(new WaitForSeconds(1f));

        kidLeonie.StartMyRandomLookingOrWrittingAnimations(2.5f, 4f, 2.5f, 5f);
        yield return(new WaitForSeconds(5f));
    }