예제 #1
0
        IEnumerator DelayedDoCommand()
        {
            yield return(new WaitForSeconds(retryWait));

            retryCounter++;
            head.DoCommand(); // Redo last command.
        }
        protected void StartNextCommand()
        {
            head = head.next;
            if (head != null)
            {
                head.DoCommand();
            }
            else
            {
                tail = null;

                if (OnQueueFinished != null)
                {
                    OnQueueFinished();
                }
            }
        }
예제 #3
0
        void InsertNodeToQueue(CommandLinkedList commandNode)
        {
            if (head == null)
            {
                head = commandNode;
                tail = commandNode;

                if (autoStart)
                    head.DoCommand();
            }
            else
            {
                tail.next = commandNode;
                tail = commandNode;
            }

            ++count;
        }
        protected void AddQueue(Firebase firebase, FirebaseCommand command, string param, object obj = null)
        {
            CommandLinkedList commandNode = new CommandLinkedList(firebase, command, param, obj);

            if (head == null)
            {
                head = commandNode;
                tail = commandNode;

                if (autoStart)
                {
                    head.DoCommand();
                }
            }
            else
            {
                tail.next = commandNode;
                tail      = commandNode;
            }

            ++count;
        }