Пример #1
0
        private void mnuOptions_Click(object sender, EventArgs e)
        {
            // Show options dialogue
            OptionsDialogue dialogue = new OptionsDialogue();

            dialogue.MdiParent = this;
            dialogue.Show();

            // Want to apply updated editor options when the dialogue is closed
            dialogue.Closed += (o, args) => this.UpdateEditors();
        }
    public IDialogueContext GetDialogueContext()
    {
        int n = optionNodes.Count;

        DialogueOption[] options = new DialogueOption[n];
        for (int i = 0; i < n; i++)
        {
            OptionNode current = optionNodes[i];
            options[i] = new DialogueOption(current.text, current.proceedToNextSpeaker);
        }

        OptionsDialogue dialogue = ScriptableObject.CreateInstance <OptionsDialogue>();

        dialogue.Init(options);

        return(dialogue);
    }