public bool execute()
        {
            bool forcewait = false;

            if (current == null)
            {
                current = nodes[0];
            }

            while (!forcewait)
            {
                if (current.execute())
                {
                    forcewait = true;
                    break;
                }
                else
                {
                    current = current.getChild();
                    if (current == null)
                    {
                        break;
                    }
                }
            }

            if (!forcewait)
            {
                this.current = null;
            }

            return(forcewait);
        }
示例#2
0
        public bool execute()
        {
            bool forcewait = false;

            if (current == null)
            {
                current = nodes[0];
                if (TrackerAsset.Instance.Started)
                {
                    TrackerAsset.Instance.Completable.Initialized(conversation.getId(), CompletableTracker.Completable.DialogNode);
                }
            }

            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
                        EndTracePending();

                        // 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
                        EndTracePending();
                        if (TrackerAsset.Instance.Started)
                        {
                            TrackerAsset.Instance.Completable.Completed(conversation.getId(), CompletableTracker.Completable.DialogNode);
                        }
                        break;
                    }
                }
            }

            if (!forcewait)
            {
                this.current = null;
            }

            return(forcewait);
        }
示例#3
0
        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);
        }
示例#4
0
        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);
        }