コード例 #1
0
 // Token: 0x06001B68 RID: 7016 RVA: 0x000801EC File Offset: 0x0007E3EC
 public void RemoveTimer(TimerQueue.TimerHandle timerHandle)
 {
     for (int i = 0; i < this.count; i++)
     {
         if (this.timers[i].handle.Equals(timerHandle))
         {
             this.RemoveTimerAt(i);
             return;
         }
     }
 }
コード例 #2
0
        // Token: 0x06001B67 RID: 7015 RVA: 0x00080158 File Offset: 0x0007E358
        public TimerQueue.TimerHandle CreateTimer(float time, Action action)
        {
            time += this.internalTime;
            int position = this.count;

            for (int i = 0; i < this.count; i++)
            {
                if (time < this.timers[i].time)
                {
                    position = i;
                    break;
                }
            }
            TimerQueue.TimerHandle timerHandle = new TimerQueue.TimerHandle(this.indexAllocator.RequestIndex());
            TimerQueue.Timer       timer       = new TimerQueue.Timer
            {
                time   = time,
                action = action,
                handle = timerHandle
            };
            HGArrayUtilities.ArrayInsert <TimerQueue.Timer>(ref this.timers, ref this.count, position, ref timer);
            return(timerHandle);
        }