예제 #1
0
        public void BeginDialogue(Sprite portrait, string name, DialogueGraph graph)
        {
            currentGraph = graph;

            dialogueUI.SetActive(true);
            dialoguePortrait.sprite = portrait;
            dialogueName.text       = name;

            StartCoroutine(ShowDialogue(0));
        }
예제 #2
0
        private DialogueGraphTransition[] GetTransitionsFor(DialogueGraph graph, int node)
        {
            LinkedList <DialogueGraphTransition> transitionsList = new LinkedList <DialogueGraphTransition>();

            foreach (DialogueGraphTransition t in graph.transitions)
            {
                if (t.from == node)
                {
                    transitionsList.AddLast(t);
                }
            }

            DialogueGraphTransition[] transitions = new DialogueGraphTransition[transitionsList.Count];
            transitionsList.CopyTo(transitions, 0);
            return(transitions);
        }
예제 #3
0
 public void changegra(Dialogue.DialogueGraph grap)
 {
     xdia = grap;
 }
 void OnEnable()
 {
     graph       = serializedObject.targetObject as DialogueGraph;
     nodes       = serializedObject.FindProperty("nodes");
     transitions = serializedObject.FindProperty("transitions");
 }
예제 #5
0
 public void SelectDialog(int index)
 {
     dialog = dialogList[index];
     dialog.Restart();
 }
예제 #6
0
 public Conversation(DialogueGraph dialogue)
 {
     this.dialogue = dialogue;
 }