Exemplo n.º 1
0
        //-------------------------------------------------------------------------
        // Auto Node API
        //-------------------------------------------------------------------------
        public override void Handle(GraphEngine graphEngine)
        {
            if (!DialogManager.IsDialogBoxOpen())
            {
                DialogManager.OpenDialogBox();
            }

            DialogManager.Type(Text, "", AutoAdvance, Delay);
        }
Exemplo n.º 2
0
        public override void Handle(GraphEngine graphEngine)
        {
            if (!DialogManager.IsDialogBoxOpen())
            {
                DialogManager.OpenDialogBox();
            }

            SwapCharacterProfile();

            string speaker = (Profile != null) ? Profile.CharacterName : "";
            string text    = Text;

            if (UseFormatting)
            {
                text = GetFormattedSentence();
            }

            DialogManager.Type(text, speaker, AutoAdvance, Delay, AnimateSpeaker);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Play a timeline (after dealing with the player character if they're in
        /// the scene).
        /// </summary>
        /// <param name="graphEngine">THe graphing engine that's handling this node.</param>
        private IEnumerator Play(GraphEngine graphEngine)
        {
            // Close the dialog box if desired.
            if (CloseDialogBefore)
            {
                DialogManager.CloseDialogBox();
            }

            yield return(new WaitForSeconds(WaitBefore));

            UpdateOutro();

            // Play timeline and wait until finished.
            Director.RebuildGraph();
            Director.Play();
            bool playing = true;

            Action <PlayableDirector> onStop = (PlayableDirector director) => { playing = false; };

            Director.stopped += onStop;

            while (playing && Director.playableGraph.IsPlaying())
            {
                yield return(null);
            }

            Director.stopped -= onStop;

            // Wait additional time if desired.
            yield return(new WaitForSeconds(WaitAfter));


            // Reopen the default dialog box if desired.
            if (CloseDialogBefore && OpenDialogAfter)
            {
                DialogManager.OpenDialogBox();
            }
        }
Exemplo n.º 4
0
        //---------------------------------------------------
        // Dialog Node API
        //---------------------------------------------------

        /// <summary>
        /// Invoke the events in the list.
        /// </summary>
        public override void Handle(GraphEngine graphEngine)
        {
            DialogManager.OpenDialogBox(dialogBoxName);
        }