public static void CloseDialogue() { if (!instance.isDialogueShown) { return; } instance.wrapper.SetActive(false); instance.isDialogueShown = false; instance.currentLinesIndex++; if (instance.currentLinesIndex >= instance.currentDialogueLines.Length) { AcceptingInputStatus.DisableAcceptingInput(); LevelEnder.EndGame(instance.currentLevelEnd); return; } if (instance.currentDialogueLines[instance.currentLinesIndex - 1].showNextLineAfterThis) { instance.wrapper.SetActive(true); // to not blink away for the one frame Trigger(instance.currentLevelEnd); } }
void Update() { if (CurrentPercentsByTime() == 100) { LevelEnd levelEnd = DialogueSystem.DialogueStarted() ? LevelEnd.INTERRUPTED : LevelEnd.PATIENT; LevelEnder.EndGame(levelEnd); } if (!dragging) { UpdateInnerBarPosition(); } UpdatePercentsText(); }