public static void Remove(UnityEngine.MonoBehaviour receiver, bool invokePending) { InterpTimedEvent interpTimedEvent; InterpTimedEvent.LList.Iterator iterator = new InterpTimedEvent.LList.Iterator(); if (!invokePending) { while (InterpTimedEvent.queue.Dequeue(receiver, (ulong)-1, out interpTimedEvent, ref iterator)) { interpTimedEvent.Dispose(); } } else { while (InterpTimedEvent.queue.Dequeue(receiver, (ulong)-1, out interpTimedEvent, ref iterator)) { InterpTimedEvent.InvokeDirect(interpTimedEvent); } } }
public static void Clear(bool invokePending) { InterpTimedEvent interpTimedEvent; InterpTimedEvent.LList.Iterator iterator = new InterpTimedEvent.LList.Iterator(); if (!invokePending) { while (InterpTimedEvent.queue.Dequeue((ulong)-1, out interpTimedEvent, ref iterator)) { interpTimedEvent.Dispose(); } } else { while (InterpTimedEvent.queue.Dequeue((ulong)-1, out interpTimedEvent, ref iterator)) { InterpTimedEvent.InvokeDirect(interpTimedEvent); } } }
public bool Dequeue(ulong playhead, out InterpTimedEvent node, ref InterpTimedEvent.LList.Iterator iter_) { if (this.count <= 0) { node = null; return(false); } InterpTimedEvent.Dir dir = (!iter_.started ? this.first : iter_.d); if (dir.has) { if ((double)((float)playhead) >= dir.node.info.timestamp) { node = dir.node; iter_.d = node.next; iter_.started = true; this.Remove(node); return(true); } } iter_.d = new InterpTimedEvent.Dir(); iter_.started = true; node = null; return(false); }
public List <InterpTimedEvent> EmergencyDump(bool botherSorting) { InterpTimedEvent interpTimedEvent; bool flag; HashSet <InterpTimedEvent> interpTimedEvents = new HashSet <InterpTimedEvent>(); InterpTimedEvent.LList.Iterator iterator = new InterpTimedEvent.LList.Iterator(); do { try { flag = this.Dequeue((ulong)-1, out interpTimedEvent, ref iterator); } catch (Exception exception) { Debug.LogException(exception); break; } if (!flag) { continue; } interpTimedEvents.Add(interpTimedEvent); }while (flag); InterpTimedEvent.Dir dir = new InterpTimedEvent.Dir(); InterpTimedEvent.Dir dir1 = dir; this.last = dir; this.first = dir1; this.count = 0; HashSet <InterpTimedEvent> fAILSAFESET = this.FAIL_SAFE_SET; this.FAIL_SAFE_SET = null; if (fAILSAFESET != null) { interpTimedEvents.UnionWith(fAILSAFESET); } List <InterpTimedEvent> interpTimedEvents1 = new List <InterpTimedEvent>(interpTimedEvents); if (botherSorting) { try { interpTimedEvents1.Sort((InterpTimedEvent x, InterpTimedEvent y) => { if (x == null) { if (y == null) { return(0); } return(0.CompareTo(1)); } if (y == null) { return(1.CompareTo(0)); } return(x.info.timestampInMillis.CompareTo(y.info.timestampInMillis)); }); } catch (Exception exception1) { Debug.LogException(exception1); } } return(interpTimedEvents1); }
public bool Dequeue(UnityEngine.MonoBehaviour script, ulong playhead, out InterpTimedEvent node, ref InterpTimedEvent.LList.Iterator iter_) { if (this.count <= 0) { node = null; return(false); } InterpTimedEvent.Dir dir = (!iter_.started ? this.first : iter_.d); while (dir.has) { if ((double)((float)playhead) >= dir.node.info.timestamp) { if (dir.node.component == script) { node = dir.node; iter_.d = node.next; iter_.started = true; this.Remove(node); return(true); } dir = dir.node.next; } else { break; } } iter_.d = new InterpTimedEvent.Dir(); iter_.started = true; node = null; return(false); }
public bool Dequeue(UnityEngine.MonoBehaviour script, ulong playhead, out InterpTimedEvent node) { InterpTimedEvent.LList.Iterator iterator = new InterpTimedEvent.LList.Iterator(); return(this.Dequeue(script, playhead, out node, ref iterator)); }
public bool Dequeue(ulong playhead, out InterpTimedEvent node) { InterpTimedEvent.LList.Iterator iterator = new InterpTimedEvent.LList.Iterator(); return(this.Dequeue(playhead, out node, ref iterator)); }