/// <summary> /// Used when the player quits out of a dialogue. Will run in the middle of or at the end of a dialogue. /// </summary> public void QuitDialogue() { if (!HasNext()) { currentConversant.SetNextDialogue(); } currentDialogue = null; TriggerExtiAction(); currentNode = null; isChoosing = false; currentConversant.TalkAnimation(false); currentConversant.HighlightInteractable(); playerAnimator.SetBool("IsTalking", false); currentConversant = null; onConversationUpdated(); GetComponent <PlayerController>().PlayerInputs().Enable(); }
public void StartDialogue(AIConversant conversant, Dialogue newDialogue) { currentConversant = conversant; currentDialogue = newDialogue; currentNode = currentDialogue.GetRootNode(); if (currentNode.IsPlayerSpeaking()) { playerAnimator.SetBool("IsTalking", true); currentConversant.TalkAnimation(false); } else { playerAnimator.SetBool("IsTalking", false); currentConversant.TalkAnimation(true); } TriggerEnterAction(); onConversationUpdated(); }