public void StartDialogue(Dialog newDialog, EndDialCallback endDial) { if (dialogPanel != null) { if (!isInDialogue) { currentDialog = newDialog; currentDialogSentenceIndex = 0; timeElapsedOnSentence = 0; isInDialogue = true; sentenceProgression = string.Empty; charProgression = 0; speakPauseTimeRemaining = 0; dialogPanel.SetActive(true); seikiFaceImage.sprite = neutralFace; nameText.text = string.Empty; endDialCallback = endDial; nextImage.gameObject.SetActive(false); } } else { Debug.LogWarning("Ne peux pas lancé le dialogue car les éléments d'ui de dialogue ne sont pas référencés. Ils se trouvent dans le canvas"); } }
public void CloseDialogue() { currentDialog = null; isInDialogue = false; dialogText.text = string.Empty; dialogPanel.SetActive(false); endDialCallback(); endDialCallback = null; }