Exemplo n.º 1
0
    IEnumerator TriggerMaximToDistractNextKid()
    {
        yield return(new WaitForSeconds(3.0f));

        kidMaxim.StopLookingAtTabletAndWrittingAnimations();

        UnityEngine.Debug.Log("SR 4 trigger");
        kidMaxim.studentAnimation.MB28_TapOnNeighbour(true);
        kidMaxim.SetMyMood(MoodIndicator.Good);

        yield return(new WaitForSeconds(3.0f));

        //kidMaxim.studentAnimation.MB28_TapOnNeighbour(false);
        //kidMaxim.LookAtSomeone(gamePlayManager.studentsActions[1].transform);  //(kidMaxim.GetComponent<StudentAction>().chairPoint.gameObject.transform.GetComponentInChildren<StudyMaterialType>().Tablet.transform);

        yield return(new WaitForSeconds(2.0f));

        gamePlayManager.studentsActions[1].StopLookingAtTabletAndWrittingAnimations();
        //gamePlayManager.studentsActions[1].LookAtSomeone(kidMaxim.transform);    //(kidMaxim.GetComponent<StudentAction>().chairPoint.gameObject.transform.GetComponentInChildren<StudyMaterialType>().Tablet.transform);
        gamePlayManager.studentsActions[1].studentAnimation.IWO29_FidgetsInChair(true); //using this animation for better visuals to player
        gamePlayManager.studentsActions[1].SetMyMood(MoodIndicator.Good);

        yield return(new WaitForSeconds(4.0f));

        gamePlayManager.studentsActions[2].SetMyMood(MoodIndicator.Bad);
        gamePlayManager.studentsActions[3].SetMyMood(MoodIndicator.Bad);
        gamePlayManager.studentsActions[4].SetMyMood(MoodIndicator.Bad);
        gamePlayManager.studentsActions[16].SetMyMood(MoodIndicator.Bad);

        yield return(new WaitForSeconds(1.0f));

        kidMaxim.StartMyTalkOrLaughAnimations();
        gamePlayManager.studentsActions[1].StartMyTalkOrLaughAnimations();
        yield return(new WaitForSeconds(4.0f));

        //kidMaxim.LookAtSomeone(kidMaxim.GetComponent<StudentAction>().chairPoint.gameObject.transform.GetComponentInChildren<StudyMaterialType>().Tablet.transform);
        //gamePlayManager.studentsActions[1].LookAtSomeone(kidMaxim.GetComponent<StudentAction>().chairPoint.gameObject.transform.GetComponentInChildren<StudyMaterialType>().Tablet.transform);


        int count = 0;

        for (int i = 0; i < 18; i++)
        {
            if (i == 3 || i == 4 || i == 16 || i == 17)
            {
                gamePlayManager.studentsActions[i].StopLookingAtTabletAndWrittingAnimations();
                gamePlayManager.studentsActions[i].studentAnimation.EE2_Upset(true);
                yield return(new WaitForSeconds(4.0f));

                gamePlayManager.studentsActions[i].studentAnimation.EE2_Upset(false);
                gamePlayManager.studentsActions[i].StartLookingAtTabletAndWrittingAnimations();

                count += 1;

                if (count >= 4)
                {
                    gamePlayManager.StartPhaseSeven(1);
                }
            }
        }
    }