Ejemplo n.º 1
0
        private void BuildSimpleDialogue()
        {
            DialogueFactory.CreateDialogLogic(this.parent, this.name, this.guid, this.showOnlyOnce);

            MessageCenterMessageType messageType;

            if (this.trigger != null)
            {
                if (!Enum.TryParse(this.trigger, out messageType))
                {
                    MessageTypes customMessageType;
                    if (!Enum.TryParse(this.trigger, out customMessageType))
                    {
                        Main.Logger.LogError("[DialogueBuilder] Invalid 'Trigger' provided.");
                    }
                    else
                    {
                        messageType = (MessageCenterMessageType)customMessageType;
                    }
                }

                DialogTrigger dialogueTrigger = new DialogTrigger(messageType, this.guid);
                dialogueTrigger.Run();
            }
        }
Ejemplo n.º 2
0
        private void BuildSimpleDialogue()
        {
            DialogueFactory.CreateDialogLogic(this.parent, this.name, this.guid, this.showOnlyOnce);

            if (this.trigger != null)
            {
                MessageCenterMessageType triggerMessageType = (MessageCenterMessageType)Enum.Parse(typeof(MessageCenterMessageType), this.trigger);
                DialogTrigger            dialogueTrigger    = new DialogTrigger(triggerMessageType, this.guid);
                dialogueTrigger.Run();
            }
        }