public static void Update() { ActiveDialogue.Update(); if (KeyHelper.CheckTap(Keys.Enter)) { if (DialogueIndex < Dialogues.Length - 1) { if (!ActiveDialogue.IsCompleted()) { ActiveDialogue.QuickComplete(); } else { ActiveDialogue = Dialogues[++DialogueIndex]; } } else { RenderHandler.CurrentGameState = GAMESTATE.ACTIVE; ActiveDialogue = null; Dialogues = new Dialogue[] { }; DialogueIndex = 0; } } }
private void SendActiveDialogue(ConversationWithActions dialogue, bool skip) { if (!Chatter.CanSendDialogue) { return; } ActiveDialogue?.StartDialogue(dialogue, skip); }
/// <summary> /// Handling animating windows, fadeing in / out canvas etc. /// </summary> protected virtual void Update() { if (IsWorking) { // Animating text canvases AnimateSelectionWindow(); AnimateReplyWindow(); // Controlling switching replys etc. if (ActiveDialogue != null) { ActiveDialogue.DialogueUpdate(); if (hidingReply) { if (softAnimationFinished) { if (ActiveDialogue.Replys != null) { if (ActiveReplyIndex >= ActiveDialogue.Replys.Count) { EndDialogue(AvailableDialogues); } else { ShowReply(); } } } } } OnWorkingUpdate(); if (ActiveReply != null) { ActiveReply.ReplyUpdate(); } } // Controlling main canvas alpha if (!IsHiding) { ConversationUI.MainCanvasG.alpha = Mathf.Lerp(ConversationUI.MainCanvasG.alpha, 1.05f, Time.unscaledDeltaTime * 10f + Time.unscaledDeltaTime * 2f); } else { ConversationUI.MainCanvasG.alpha = Mathf.Lerp(ConversationUI.MainCanvasG.alpha, -0.05f, Time.unscaledDeltaTime * 10f + Time.unscaledDeltaTime * 2f); if (ConversationUI.MainCanvasG.alpha <= 0f) { FinishingHidingConversationSystem(); } } }
public void startFailDialogue() { if (dialogue[2].Length == 0) { noDialogue = true; } else { animator.SetBool("isOpen", true); activeDialogue = ActiveDialogue.Fail; dialogueIndex = 0; dialogueStarted = true; isComplete = false; showNextSentence(); } }
/// <summary> /// Generating and showing dialogue options inside conversation /// </summary> protected virtual void ShowDialogueOptions(List <FBasic_DialogueBase> dialogues) { GenerateDialogueOptions(dialogues); ConversationUI.DialogueCanvasG.blocksRaycasts = true; ConversationUI.ReplyCanvasG.blocksRaycasts = false; ConversationUI.MainCanvasG.blocksRaycasts = true; OnShowDialogueOptions(); if (ActiveDialogue != null) { ActiveDialogue.OnDialogueEnd(); } if (ActiveReply != null) { ActiveReply.OnReplySkip(); } ActiveDialogue = null; ActiveReply = null; SetDefaultCameraOrientation(); }
// Use this for initialization void Start() { // Screen.SetResolution(Screen.width, Screen.width * 16 / 9, true); SM = FindObjectOfType <SoundManager>(); AD = FindObjectOfType <ActiveDialogue>(); }
public static void Draw(SpriteBatch sp) { ActiveDialogue.Draw(sp); }