Ejemplo n.º 1
0
        public void ForceStopDialogue()
        {
            CurrentDialogueName = "none";
            if (currentDialogueSet != null)
            {
                currentDialogueSet.Reset();
            }
            currentDialogueSet    = null;
            currentText           = "";
            currentSubstringIndex = 0;

            DialogueSetEnded?.Invoke();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Plays the given dialogue set. If another is playing, it is overwritten by this one.
        /// </summary>
        public void PlayDialogueSet(string setName, AssetsManager assetsManagerWithDialogue)
        {
            currentText           = "";
            currentSubstringIndex = 0;

            currentDialogueSet  = new DialogueSetInstance(assetsManagerWithDialogue.GetAsset <DialogueSet>(setName));
            CurrentDialogueName = setName;
            currentDialogueSet.StartNextDialogue();

            DialogueSetStarted?.Invoke();
            DialogueChanged?.Invoke(currentDialogueSet);

            this.assetsManagerWithDialogue = assetsManagerWithDialogue;

            fullText = CurrentDialogueFullText();
        }