Example #1
0
 private void CompleteActions()
 {
     queue.Remove(this);
     if (current != null)
     {
         current.actions.Invoke();
     }
     else
     {
         DialogueManager.Continue(currentNode);
     }
 }
Example #2
0
 /// <summary>
 /// Trigger all the actions. Note: not all actions needs the dialogue to pause, so we have stuff in the code handling that.
 /// </summary>
 public bool Invoke(Node currentNode)
 {
     if (actions != null && actions.GetPersistentEventCount() > 0 && !queue.Contains(this))
     {
         this.currentNode = currentNode;
         queue.Add(this);
         if (current == this)
         {
             actions.Invoke();
         }
         else
         {
             Debug.Log("Please note that simultaneous Actions are not permitted. Actions will be queued and run in succession.");
         }
         return(true);
     }
     else
     {
         return(DialogueManager.Continue(currentNode));
     }
 }