public IEnumerator MachineUnfold() { pressOK = false; FinalCameraController.machineOpen = true; FinalCameraController.DisableInput(true); //disable any input // if (isFirstOpen) { //只有karara见到过的衣服才能进collection isFirstOpen = false; AddClothToCollection(); } //@@@ FinalCameraController.alreadyClothUI = true; FinalCameraController.currentClothUI = ClothUI; DoorImage.sprite = AllMachines.openedDoor; Occupied.SetActive(false); Animator ac = ClothUI.GetComponent <Animator>(); ac.SetTrigger("StartShowing"); FinalCameraController.machineOpen = false; FinalCameraController.DisableInput(false); pressOK = true; yield return(null); }
IEnumerator MachineUnfold() { pressOK = false; //disable any input FinalCameraController.DisableInput(true); if (FinalCameraController.isTutorial && FinalCameraController.TutorialManager.tutorialNumber > 12) { yield break; } Show(backgroundUI); yield return(new WaitForSeconds(0.3f)); Show(backgroundUI2); yield return(new WaitForSeconds(0.2f)); Show(backgroundUI3); yield return(new WaitForSeconds(0.1f)); GenerateCloth(this.transform.gameObject.tag); Show(ClothUI); pressOK = true; FinalCameraController.DisableInput(false); if (FinalCameraController.isTutorial && FinalCameraController.TutorialManager.tutorialNumber == 8 && FinalCameraController.TutorialManager.clicktime == 10) { // //之前是立刻关上门,鱼开始说话 // shut = 0; // Hide(ClothUI); // Hide(backgroundUI3); // yield return new WaitForSeconds(0.1f); // Hide(backgroundUI2); // yield return new WaitForSeconds(0.2f); // Hide(backgroundUI); // yield return new WaitForSeconds(0.1f); // // DoorImage.sprite = AllMachines.closedDoor; FinalCameraController.TutorialManager.tutorialNumber = 9; } else if (FinalCameraController.isTutorial && FinalCameraController.TutorialManager.tutorialNumber == 10) { FinalCameraController.TutorialManager.tutorialNumber = 11;//如果karara还是把门打开了 } }
//typewriter public IEnumerator AnimateText(TextMeshProUGUI text, string textContent, bool showArrow, GameObject hintObject, Vector2 arrowPosition) { clicktime++; FinalCameraController.DisableInput(true); lastTextFinish = false; Hide(hintArrowCG); // if(startClicktime == clicktime && startTutorialNum == tutorialNumber) // { for (int i = 0; i < (textContent.Length + 1); i++) { text.text = textContent.Substring(0, i); yield return(new WaitForSeconds(.001f)); showHintArrow = false; if (i == textContent.Length) { FinalCameraController.DisableInput(false); yield return(new WaitForSeconds(.005f)); if (tutorialNumber == 3) //是在说话之后才disable的,会导致如果在说话中途滑动,可能会出现对话框消失的情况 { scrollControl(false); FinalCameraController.DisableInput(false); } else if (tutorialNumber == 15) { FinalCameraController.DisableInput(true); } else if (tutorialNumber == 16) { // FinalCameraController.DisableInput(true); } lastTextFinish = true; showHintArrow = showArrow; if (showArrow) { Show(hintArrowCG); hintArrow.transform.SetParent(hintObject.transform); hintArrow.GetComponent <RectTransform>().anchoredPosition = arrowPosition; } else { Hide(hintArrowCG); } } } // } // else // { // text.text = textContent; // lastTextFinish = true; // if(showArrow) // { // Show(hintArrowCG); // hintArrow.transform.SetParent(hintObject.transform); // hintArrow.GetComponent<RectTransform>().anchoredPosition = arrowPosition; // } // else{Hide(hintArrowCG);} // } }