Exemplo 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)));
        }
    }
Exemplo n.º 2
0
 public static void ShowDialogueNode(NodeEditorFramework.Standard.DialogueNode node, Entity speaker = null)
 {
     Instance.showDialogueNode(node, speaker);
 }
Exemplo 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);
 }