public bool execute() { bool forcewait = false; if (current == null) { current = nodes[0]; } while (!forcewait) { if (current.execute()) { forcewait = true; break; } else { ConversationNodeHolder child = current.getChild(); if (current.TracePending) { // If the current node has a pending trace // We end the previous trace pending if (tracePendingNode != null) { tracePendingNode.EndTrace(); } // And we put this into pending tracePendingNode = current; } current = child; if (current == null) { // When the conversation is over if there's a // pending node, we end it if (tracePendingNode != null) { tracePendingNode.EndTrace(); } break; } } } if (!forcewait) { this.current = null; } return(forcewait); }
public bool execute() { bool forcewait = false; if (current == null) { current = nodes[0]; } while (!forcewait) { if (current.execute()) { forcewait = true; break; } else { ConversationNodeHolder child = current.getChild(); if (current.TracePending) { if (tracePendingNode != null) { tracePendingNode.EndTrace(); } tracePendingNode = current; } current = child; if (current == null) { if (tracePendingNode != null) { tracePendingNode.EndTrace(); } break; } } } if (!forcewait) { this.current = null; } return(forcewait); }
public void EndTracePending() { if (tracePendingNode != null && tracePendingNode.TracePending) { tracePendingNode.EndTrace(); } }