Exemplo n.º 1
0
        // Token: 0x06001B6A RID: 7018 RVA: 0x00080264 File Offset: 0x0007E464
        public void Update(float deltaTime)
        {
            this.internalTime += deltaTime;
            int num = 0;

            while (num < this.count && this.timers[num].time <= this.internalTime)
            {
                HGArrayUtilities.ArrayInsert <Action>(ref this.actionsToCall, ref this.actionsToCallCount, this.actionsToCallCount, ref this.timers[num].action);
                num++;
            }
            for (int i = this.actionsToCallCount - 1; i >= 0; i--)
            {
                this.RemoveTimerAt(i);
            }
            for (int j = 0; j < this.actionsToCallCount; j++)
            {
                this.actionsToCall[j]();
                this.actionsToCall[j] = null;
            }
            this.actionsToCallCount = 0;
        }
Exemplo n.º 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);
        }
 // Token: 0x06000166 RID: 358 RVA: 0x000087D8 File Offset: 0x000069D8
 public static void ArrayAppend <T>(ref T[] array, ref int arraySize, ref T value)
 {
     HGArrayUtilities.ArrayInsert <T>(ref array, ref arraySize, arraySize, ref value);
 }
 // Token: 0x06001815 RID: 6165 RVA: 0x00072F66 File Offset: 0x00071166
 private void InsertAt(int i, IndexAllocator.Range range)
 {
     HGArrayUtilities.ArrayInsert <IndexAllocator.Range>(ref this.ranges, ref this.rangeCount, i, ref range);
 }
    // Token: 0x06000165 RID: 357 RVA: 0x000087BC File Offset: 0x000069BC
    public static void ArrayInsert <T>(ref T[] array, int position, ref T value)
    {
        int num = array.Length;

        HGArrayUtilities.ArrayInsert <T>(ref array, ref num, position, ref value);
    }