public void ShowPuzzle() { PersistentEngine.player.SetInCutScene(true, CutsceneTools.Type.Puzzle); PersistentEngine.player.ChangeState(actionAnimation); PersistentEngine.player.SetDestination(PersistentEngine.player.transform.position); if (doCloseup) { advCam.CloseUpBegin(closeUpSize, closeUpOffset); } StartCoroutine(ShowPuzzleProcedure()); }
IEnumerator ProcessArrivedAt() { if (desiredDirection == 1) { PersistentEngine.player.TurnTowards(true); } else if (desiredDirection == -1) { PersistentEngine.player.TurnTowards(false); } bool wasInCutScene = false; wasInCutScene = PersistentEngine.player.inCutScene; if (!allowInterruptions) { PersistentEngine.player.SetInCutScene(true, cutsceneTool, PersistentEngine.player.transform.position); } if (doCloseup) { advCamera.CloseUpBegin(closeUpCameraSize, closeUpOffset); } bool hasSomethingMeaningfulOccurred = false; for (int i = 0; i < actionChain.Length; i++) { if (!actionChain[i].enabled || actionChain[i].ShouldSkip()) { continue; } actionChain[i].StopHighlighting(); if (actionChain[i] is InteractiveItemComment) { yield return(new WaitForSeconds(0.1f)); } if (heldItem != null) { if (actionChain[i] is InteractiveItemCombine || actionChain[i] is InteractiveItemComment || actionChain[i] is InteractiveItemControlCamera || actionChain[i] is InteractiveItemChangeCamera) { yield return(StartCoroutine(actionChain[i].ProcessArrivedAt())); hasSomethingMeaningfulOccurred = true; } } else { if (!(actionChain[i] is InteractiveItemCombine)) { yield return(StartCoroutine(actionChain[i].ProcessArrivedAt())); } } } if (doCloseup) { advCamera.CloseUpEnd(); } if (!realyStayInCutscene) { if (!stayInCutscene || !hasSomethingMeaningfulOccurred) { if (!allowInterruptions && !wasInCutScene) { PersistentEngine.player.SetInCutScene(false); } } } }