private void CheckAndAdd()
 {
     if (jobs.Count < concurrent)
     {
         int num = concurrent - jobs.Count;
         for (int i = 0; i < num; i++)
         {
             if (coroutines.Count > 0)
             {
                 IEnumerator coroutine = coroutines.Dequeue();
                 CM_Job      job       = CM_Job.Make(coroutine).NotifyOnJobComplete(notifyOnJobComplete);
                 if (isRunning)
                 {
                     job.Start();
                 }
                 jobs.Add(job);
                 if (NotifyOnJobStarted != null)
                 {
                     NotifyOnJobStarted(coroutine);
                 }
             }
             else
             {
                 break;
             }
         }
     }
 }
예제 #2
0
        public void Show()
        {
            m_Animator.SetTrigger(SHOW_HASH);

            m_ButtonBounceJob.Start();

            m_IsVisible = true;

            Events.instance.Raise(new MenuStatusChangedEvent(IsVisible(), IsAdditionalVisible()));
        }
예제 #3
0
        public override bool ChangeState()
        {
            if (m_Consumed.AllConsumed() && !m_MarkCompleteJob.running)
            {
                m_MarkCompleteJob.Start();
            }

            if (m_ShouldTransition)
            {
                Debug.Log("Should transition");
                PerformTransition();
                return(true);
            }

            return(false);
        }
예제 #4
0
 public override void Enter()
 {
     m_ShowShapesJob.Start();
 }