public override void OnCanceled()
 {
     base.OnCanceled();
     this.UserRequestHide();
     this.pendingMessages.Clear();
     this.currentMessage = null;
     this.SetState(DialogState.Finished);
     this.SendCompleteMessage();
 }
        public void AfterDialogHide()
        {
            Mod.Log.Trace?.Write("CDS:ADH - entered.");
            this.sideStack.AfterDialogHide();

            Transform speakerNameFieldT = this.sideStack.gameObject.transform.Find("Representation/dialog-layout/Portrait/speakerNameField");

            if (speakerNameFieldT == null)
            {
                Mod.Log.Warn?.Write("COULD NOT FIND speakerNameFieldT!");
            }
            speakerNameFieldT.gameObject.SetActive(false);

            if (ModState.DialogueQueue.Count > 0)
            {
                Mod.Log.Trace?.Write("  DialogQueue has additional messages, reading another instead of exiting.");
                this.currentMessage = (CustomDialogMessage)ModState.DialogueQueue.Dequeue();
                this.SetState(DialogState.Talking);
                return;
            }
        }
Esempio n. 3
0
        public static void OnCustomDialogMessage(MessageCenterMessage message)
        {
            CustomDialogMessage msg = (CustomDialogMessage)message;

            if (msg == null)
            {
                return;
            }

            ModState.DialogueQueue.Enqueue(msg);
            if (!ModState.IsDialogStackActive)
            {
                Mod.Log.Debug("No existing dialog sequence, publishing a new one.");
                ModState.IsDialogStackActive = true;
                MessageCenter.PublishMessage(
                    new AddParallelSequenceToStackMessage(new CustomDialogSequence(Combat, SideStack, false))
                    );
            }
            else
            {
                Mod.Log.Debug("Existing dialog sequence exists, skipping creation.");
            }
        }
 public override void OnAdded()
 {
     base.OnAdded();
     this.currentMessage = (CustomDialogMessage)ModState.DialogueQueue.Dequeue();
     this.SetState(DialogState.Talking);
 }