Esempio n. 1
0
    private void showDialogueNode(NodeEditorFramework.Standard.DialogueNode node, Entity speaker)
    {
        CreateWindow(dialogueBoxPrefab, node.text, node.textColor, speaker);
        DialogueViewTransitionIn(speaker);

        // create buttons
        buttons = new GameObject[node.answers.Count];

        for (int i = 0; i < node.answers.Count; i++)
        {
            int index = i;
            buttons[i] = CreateButton(node.answers[i], () => {
                AudioManager.PlayClipByID("clip_select", true);
                endDialogue(index + 1, false);// cancel is always first -> start from 1
            }, 24 + 24 * (node.answers.Count - (i + 1)));
        }
    }
Esempio n. 2
0
 public static void ShowDialogueNode(NodeEditorFramework.Standard.DialogueNode node, Entity speaker = null)
 {
     Instance.showDialogueNode(node, speaker);
 }
Esempio n. 3
0
 public static void ShowDialogueNode(NodeEditorFramework.Standard.DialogueNode node, Entity speaker = null)
 {
     Instance.showDialogue(node.text, node.answers, speaker, node.textColor, node.useEntityColor);
 }