Example #1
0
    // Token: 0x06004BAB RID: 19371 RVA: 0x00127B20 File Offset: 0x00125D20
    private void Add(MonoBehaviour mb, int updateOrder, global::UpdateManager.OnUpdate func, List <global::UpdateManager.UpdateEntry> list)
    {
        int i     = 0;
        int count = list.Count;

        while (i < count)
        {
            global::UpdateManager.UpdateEntry updateEntry = list[i];
            if (updateEntry.func == func)
            {
                return;
            }
            i++;
        }
        list.Add(new global::UpdateManager.UpdateEntry
        {
            index           = updateOrder,
            func            = func,
            mb              = mb,
            isMonoBehaviour = (mb != null)
        });
        if (updateOrder != 0)
        {
            list.Sort(new Comparison <global::UpdateManager.UpdateEntry>(global::UpdateManager.Compare));
        }
    }
Example #2
0
 // Token: 0x06004BA2 RID: 19362 RVA: 0x00127828 File Offset: 0x00125A28
 private static int Compare(global::UpdateManager.UpdateEntry a, global::UpdateManager.UpdateEntry b)
 {
     if (a.index < b.index)
     {
         return(1);
     }
     if (a.index > b.index)
     {
         return(1);
     }
     return(0);
 }
Example #3
0
    // Token: 0x06004BA4 RID: 19364 RVA: 0x001278C0 File Offset: 0x00125AC0
    private void UpdateList(List <global::UpdateManager.UpdateEntry> list, float delta)
    {
        int i = list.Count;

        while (i > 0)
        {
            global::UpdateManager.UpdateEntry updateEntry = list[--i];
            if (updateEntry.isMonoBehaviour)
            {
                if (updateEntry.mb == null)
                {
                    list.RemoveAt(i);
                    continue;
                }
                if (!updateEntry.mb.enabled || !updateEntry.mb.gameObject.activeInHierarchy)
                {
                    continue;
                }
            }
            updateEntry.func(delta);
        }
    }