// 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; } }
// 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; } }
// 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; } }
// Update is called once per frame void Update() { Billboard.GetComponent <BillboardManager>().SetDebugInfo("Task 1 - State: " + substate); switch (substate) { case 1: Talker.GetComponent <SPHelperTalk>().Speak(Task1VOs[0]); Billboard.HighLight(0); Controller.ChangeControlMode(); Controller.controlMode = 1; Controller.rightHandHoverUI.GetComponentInChildren <UnityEngine.UI.Text>().text = "Move Mode"; substate = 2; break; case 2: if (FirstMoveDetector.IfTouched()) { // 1st island lose 1 health. StartCoroutine(BreakCrystal(firstCrystal)); // play VO good job, then go get item StartCoroutine(finishAndGo()); substate = 3; } break; case 3: if (SecondMoveDetector.IfTouched()) { // crystal break and island fall islandPosBeforeFall = islandToFall.transform; StartCoroutine(BreakCrystal(secondCrystal)); StartCoroutine(IslandFall()); // VO island HP Talker.GetComponent <SPHelperTalk>().Speak(Task1VOs[3]); substate = 4; } break; case 4: if (talkerAnim.FinishedTalking()) { // VO move again Talker.GetComponent <SPHelperTalk>().Speak(Task1VOs[4]); // island with full health return islandToReturn.SetActive(true); iTween.MoveTo(islandToReturn, iTween.Hash("position", islandPosBeforeFall, "easetype", iTween.EaseType.easeInOutSine)); Walker.SetActive(true); substate = 5; } break; case 5: if (ThirdMoveDetector.IfTouched()) { // 3st island lose 1 health. StartCoroutine(BreakCrystal(thirdCrystal)); Walker.transform.LookAt(Walker.transform.position + new Vector3(-0.2f, 0, 0)); // helper look at player // VO got item, helper fly Talker.GetComponent <SPHelperTalk>().Speak(Task1VOs[5]); AudioCenter.PlayGetItem(); StartCoroutine(HelperFlyToInventory()); // turn off moving Controller.rightHandHoverUI.GetComponentInChildren <UnityEngine.UI.Text>().text = "Hold on..."; // item appear on inv HealItemOnBoard.SetActive(false); Inventory.SetActive(true); HealItemOnInv.SetActive(true); substate = 6; } break; case 6: if (talkerAnim.FinishedTalking()) { Billboard.Check(0); Talker.GetComponent <SPHelperTalk>().Speak(Task1VOs[6]); substate = 7; } break; case 7: if (talkerAnim.FinishedTalking()) { substate = 8; } break; case 8: overallManager.startTask2(); overallManager.destroyStuff(this.gameObject); break; } }
// Update is called once per frame void Update() { Billboard.GetComponent <BillboardManager>().SetDebugInfo("Task 3 - State: " + substate); switch (substate) { case 1: Helper.GetComponent <SPHelperTalk>().Speak(Task3VOs[0]); OtherInventory.SetActive(true); Billboard.HighLight(2); substate = 2; break; case 2: if (helperAnim.FinishedTalking()) { Helper.GetComponent <SPHelperTalk>().Speak(Task3VOs[1]); Controller.canControl = true; substate = 3; Controller.rightHandHoverUI.GetComponentInChildren <UnityEngine.UI.Text>().text = "Press Trigger to cancel"; } break; case 3: if (Controller.controlMode == 0) { Helper.GetComponent <SPHelperTalk>().Speak(Task3VOs[2]); // here VO problem: Send Item Mode and Touch Item should be in different file. //disable move here, in case the player choose move again. Controller.moveDisabled = true; Controller.sendItemDisabled = false; Controller.SendButtonFlash(); substate = 4; } break; case 4: if (Controller.controlMode == 2) { Controller.moveDisabled = false; Controller.sendItemDisabled = true; Helper.GetComponent <SPHelperTalk>().Speak(Task3VOs[3]); substate = 5; } break; case 5: if (ItemOnInventory.GetComponent <touchDetector>().IfTouched()) { Helper.GetComponent <SPHelperTalk>().Speak(Task3VOs[4]); ItemOnInventory.SetActive(false); ItemOnOtherInventory.SetActive(true); substate = 6; } break; case 6: if (helperAnim.FinishedTalking()) { Helper.GetComponent <SPHelperTalk>().Speak(Task3VOs[5]); StartCoroutine(ActionPointsAnim()); substate = 7; } break; case 7: break; case 8: if (helperAnim.FinishedTalking()) { Billboard.Check(2); StartCoroutine(HelperFlyToIsland()); } break; } }