Пример #1
0
    // Update is called once per frame
    void Update()
    {
        Billboard.GetComponent <BillboardManager>().SetDebugInfo("Task 4 - State: " + substate);

        switch (substate)
        {
        case 1:
            Helper.GetComponent <SPHelperTalk>().Speak(Task4VOs[0]);
            HealthPoints.SetActive(true);
            Billboard.HighLight(3);
            substate = 2;
            break;

        case 2:
            if (helperAnim.FinishedTalking())
            {
                Helper.GetComponent <SPHelperTalk>().Speak(Task4VOs[1]);
                Controller.canControl = true;
                substate = 3;
            }
            break;

        case 3:
            if (Controller.controlMode == 0)
            {
                Helper.GetComponent <SPHelperTalk>().Speak(Task4VOs[2]);
                substate = 4;
            }
            break;

        case 4:
            if (IslandHealthMoveDetector.IfTouched())
            {
                Helper.GetComponent <SPHelperTalk>().Speak(Task4VOs[3]);
                StartCoroutine(BreakCrystal());
                // turn helper around
                Controller.canControl = false;
                Helper.transform.LookAt(Helper.transform.position + new Vector3(-0.2f, 0, 0));

                helperAnim.Success();

                substate = 5;
            }
            break;

        case 5:
            if (helperAnim.FinishedTalking())
            {
                Billboard.Check(3);

                StartCoroutine(FinishTask4());
                substate = -1;
            }
            break;
        }
    }
Пример #2
0
    // Update is called once per frame
    void Update()
    {
        Billboard.GetComponent <BillboardManager>().SetDebugInfo("Task 5 - State: " + substate);

        switch (substate)
        {
        case 1:
            Billboard.HighLight(4);
            StartCoroutine(DestroyCrystal(firstBreakCrystals));
            StartCoroutine(IslandFall());
            substate = 2;
            break;

        case 2:
            Helper.GetComponent <SPHelperTalk>().Speak(Task5VOs[0]);
            StartCoroutine(HelperFlyToClock());

            substate = 3;
            break;

        case 3:
            if (helperAnim.FinishedTalking())
            {
                Helper.GetComponent <SPHelperTalk>().Speak(Task5VOs[1]);
                //StartCoroutine(DestroyCrystal(secondBreakCrystals));
                StartCoroutine(playClockAnim());
                substate = 4;
            }
            break;

        case 4:
            if (helperAnim.FinishedTalking() && ClockAnimDone)
            {
                Billboard.Check(4);
                helperAnim.Success();
                StartCoroutine(FinishTask5());
                substate = -1;
            }
            break;
        }
    }
Пример #3
0
    // Update is called once per frame
    void Update()
    {
        Billboard.GetComponent <BillboardManager>().SetDebugInfo("Task 6 - State: " + substate);

        switch (substate)
        {
        case 1:
            Billboard.HighLight(2);
            Talker.GetComponent <SPHelperTalk>().Speak(Task6VOs[0]);
            substate = 2;
            break;

        case 2:
            if (talkerAnim.FinishedTalking())
            {
                Talker.GetComponent <SPHelperTalk>().Speak(Task6VOs[1]);
                RuneOnTile.SetActive(true);
                TwoRunesInInventory.SetActive(true);
                substate = 3;
            }

            break;

        case 3:
            if (talkerAnim.FinishedTalking())
            {
                // Helper.GetComponent<SPHelperTalk>().Speak(Task6VOs[2]); Seems repeted;
                Controller.canControl  = true;
                Controller.controlMode = 1;
                Controller.rightHandHoverUI.GetComponentInChildren <UnityEngine.UI.Text>().text = "Move Mode";
                substate = 4;
            }
            break;

        case 4:
            if (RuneOnTile.GetComponent <moveDetector>().IfTouched())
            {
                Talker.GetComponent <SPHelperTalk>().Speak(Task6VOs[3]);
                //Walker.transform.LookAt(Walker.transform.position + new Vector3(-0.2f, 0, 0));

                AudioCenter.PlayGetItem();
                RuneOnTile.SetActive(false);
                ThirdRuneInInventory.SetActive(true);
                substate = 5;
            }
            break;

        case 5:
            if (KeyOnTile.GetComponent <moveDetector>().IfTouched())
            {
                AudioCenter.PlayGetItem();
                ThirdRuneInInventory.SetActive(false);
                TwoRunesInInventory.SetActive(false);
                KeyOnTile.SetActive(false);
                KeyOnInventory.SetActive(true);
                substate = 6;
            }
            break;

        case 6:
            if (Door.GetComponent <moveDetector>().IfTouched())
            {
                Talker.GetComponent <SPHelperTalk>().Speak(Task6VOs[4]);
                Door.GetComponent <Animator>().SetTrigger("DoorOpen");
                KeyOnInventory.SetActive(false);
                //Walker.transform.LookAt(Walker.transform.position + new Vector3(-0.2f, 0, 0));
                iTween.MoveTo(Talker, iTween.Hash("position", NextPlace, "easetype", iTween.EaseType.easeInOutSine));
                talkerAnim.Success();
                Billboard.Check(2);

                substate = 7;
            }
            break;

        case 7:
            if (talkerAnim.FinishedTalking())
            {
                StartCoroutine(FinishTutorial());
                substate = -1;
            }
            break;
        }
    }