Exemplo n.º 1
0
 // Token: 0x0600172B RID: 5931 RVA: 0x000290D8 File Offset: 0x000280D8
 internal void Update(float dT)
 {
     this.mFlasherQueue.Sort();
     foreach (FlasherBase flasherBase in this.mFlasherQueue)
     {
         if (flasherBase.Status == FlasherBase.eFlasherStatus.eRunning)
         {
             flasherBase.RunningTimer += dT;
             if (flasherBase.DisplayTime >= 0f && flasherBase.RunningTimer > flasherBase.DisplayTime)
             {
                 flasherBase.Status = FlasherBase.eFlasherStatus.eCanceled;
                 Flashers.CancelFlasher(flasherBase.Id);
             }
             else if (flasherBase != this.mFlasherQueue[0])
             {
                 if (flasherBase.KillWhenCut)
                 {
                     flasherBase.Status = FlasherBase.eFlasherStatus.eMarkedForDeletion;
                     Flashers.KillFlasher(flasherBase.Id);
                 }
                 else
                 {
                     Flashers.CancelFlasher(flasherBase.Id);
                     flasherBase.Init(flasherBase.Id);
                 }
             }
         }
         else
         {
             flasherBase.EnqueueTimer += dT;
             if ((double)flasherBase.WaitingLimit >= 0.0 && flasherBase.EnqueueTimer > flasherBase.WaitingLimit)
             {
                 flasherBase.Status = FlasherBase.eFlasherStatus.eCanceled;
                 Flashers.CancelFlasher(flasherBase.Id);
             }
         }
     }
     for (int i = this.mFlasherQueue.Count - 1; i >= 0; i--)
     {
         FlasherBase flasherBase2 = this.mFlasherQueue[i];
         if (flasherBase2.Status == FlasherBase.eFlasherStatus.eMarkedForDeletion)
         {
             flasherBase2.Reset();
             this.mFlasherQueue.RemoveAt(i);
         }
     }
     if (this.mFlasherQueue.Count > 0)
     {
         FlasherBase flasherBase3 = this.mFlasherQueue[0];
         if (flasherBase3.Status == FlasherBase.eFlasherStatus.eIdle)
         {
             flasherBase3.Status = FlasherBase.eFlasherStatus.eRunning;
             Flashers.AddFlasher(flasherBase3.CreateFrontendFlasherObj());
         }
     }
 }
Exemplo n.º 2
0
        // Token: 0x06001728 RID: 5928 RVA: 0x00028FA8 File Offset: 0x00027FA8
        public void DequeueFlasher(int flasher_id)
        {
            FlasherBase flasherBase = this.mFlasherQueue.Find((FlasherBase f) => f.Id == flasher_id);

            if (flasherBase != null)
            {
                if (flasherBase.Status == FlasherBase.eFlasherStatus.eRunning)
                {
                    flasherBase.Status = FlasherBase.eFlasherStatus.eCanceled;
                    Flashers.CancelFlasher(flasherBase.Id);
                    return;
                }
                if (flasherBase.Status == FlasherBase.eFlasherStatus.eIdle)
                {
                    flasherBase.Status = FlasherBase.eFlasherStatus.eMarkedForDeletion;
                }
            }
        }