Ejemplo n.º 1
0
    void PlayStage()
    {
        aSource.Stop();
        switch (section)
        {
        case 0:
            scText.text  = strings1[stage];
            aSource.clip = clips1[stage];
            aSource.Play();
            break;

        case 1:
            scText.text  = strings2[stage];
            aSource.clip = clips2[stage];
            aSource.Play();
            break;

        case 2:
            scText.text  = talkStrings[stage];
            aSource.clip = talkClips[stage];
            textToSpeech.TalkFromClip(talkClips[stage], agent);
            break;

        case 3:
            scText.text  = strings3[stage];
            aSource.clip = clips3[stage];
            aSource.Play();
            break;
        }

        switch (section)
        {
        case 0:
            switch (stage)
            {
            case 0:
                scam.focusTarget = agent.GetHeadPosition().gameObject;

                // set agent values to zero
                agent.openness          = 0;
                agent.conscientiousness = 0;
                agent.extraversion      = 0;
                agent.agreeableness     = 0;
                agent.neuroticism       = 0;

                agent.C_LabanIK       = true;
                agent.C_LabanRotation = true;
                agent.C_SpeedAdjust   = true;
                agent.C_Fluctuation   = true;
                agent.C_LookIK        = true;
                agent.C_LookShift     = true;

                agent.Map_OCEAN_to_LabanEffort = true;
                agent.Map_OCEAN_to_LabanShape  = true;
                agent.Map_OCEAN_to_Additional  = true;

                C_IntroTextUp();
                C_SetCamTo(CamPosition.VIDEO_MAKER, 0.04f);
                Invoke("AnimateHandGesture", 1.3f);
                break;

            case 1:
                C_IntroTextDown();
                C_IntroTextUp_Laban();
                C_RotateCamLeft();

                break;

            case 2:
                break;

            case 3:
                break;

            case 4:
                C_IntroTextUp_Watson();
                break;

            case 5:
                // C_IntroTextUp_OculusBio();
                break;

            case 8:
                canvasController.oceanPanelShow.SetActive(true);         // .OpenOcean();
                C_RotateCamEnd();
                Invoke("OCEAN_1", 1.5f);
                break;

            case 10:
                C_IntroTextUp_EffortShape();
                break;

            case 11:
                canvasController.labanPanelShow.SetActive(true);
                break;

            case 12:
                Invoke("Shape_1", 1.5f);
                break;


            case 96:
                // canvasController.labanPanelShow.SetActive(true);

                agent.SetAnimation(20);
                agent.C_SpeedAdjust = false;
                agent.anim.speed    = 0.8f;
                break;

            case 97:
                agent.lineColor1    = Color.black;
                agent.lineColor2    = Color.black;
                agent.lineWidthLow  = 0.015f;
                agent.lineWidthHigh = 0.015f;
                agent.linesFor      = LinesFor.LeftHand;


                agent.lineWidthLow  = 0.015f;
                agent.lineWidthHigh = 0.025f;
                agent.lineColor1    = Color.blue;
                agent.lineColor2    = Color.red;
                break;

            case 99:
                agent.linesFor = LinesFor.RightHand;
                break;

            case 910:
                agent.linesFor = LinesFor.None;
                agent.SetAnimation(0);
                agent.C_SpeedAdjust = true;
                canvasController.labanPanelShow.SetActive(false);
                canvasController.labanEffortPanelShow.SetActive(true);
                break;

            case 112:         // space
                Invoke("Effort_1", 0.5f);
                break;

            case 102:         // weight
                Invoke("Effort_3", 0.5f);
                break;

            case 13:         // time
                Invoke("Effort_5", 0.5f);
                agent.C_LabanIK     = false;
                agent.C_SpeedAdjust = true;

                agent.SetAnimation(22);
                break;

            case 14:         // hand displacements
                agent.DeltaHandsToLines();
                aniIns.minTargetSpeed = 0.08f;
                aniIns.maxTargetSpeed = 0.5f;
                break;

            case 17:         // flow
                agent.RemoveDeltaHandsToLines();
                aniIns.minTargetSpeed = 1.2f;
                aniIns.maxTargetSpeed = 0.8f;
                break;
            }
            break;

        case 1:
            switch (stage)
            {
            case 0:
                canvasController.labanEffortPanelShow.SetActive(false);
                agent.C_Fluctuation   = false;
                agent.C_LabanIK       = false;
                agent.C_LabanRotation = false;
                agent.lookObject      = cam.gameObject;
                agent.C_LookIK        = true;
                canvasController.facialExpressionPanelShow.SetActive(true);
                break;

            case 1:
                Face_0();
                cam.transform.rotation = camRotationOrig;
                cam.transform.position = camPositionFace;
                break;
            }
            break;

        case 2:
            camPivot.transform.Rotate(0, Random.Range(-20, 20), 0);
            break;
        }
    }