Пример #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;
 }