public static void AddLateTick(ILateTick tick) { if (!lateTicksRecord.ContainsKey(tick)) { lateTicksRecord[tick] = lateTicks.AddLast(tick); } }
public static void RemoveLateTick(ILateTick tick) { LinkedListNode <ILateTick> node; if (lateTicksRecord.TryGetValue(tick, out node)) { lateTicks.Remove(node); lateTicksRecord.Remove(tick); } }
public static void LateTick() { LinkedListNode <ILateTick> node = lateTicks.First; while (node != null) { ILateTick tick = node.Value; node = node.Next; tick.OnLateTick(); } }
public void AddLateTick(ILateTick lateTick) { _lateTicks += lateTick.LateUpdate; }
public void RemoveLateTick(ILateTick lateTick) { _lateTicks -= lateTick.LateUpdate; }
/// <summary> /// Removes all existance of a Late Tick /// </summary> /// <param name="t">Late Tick</param> public void RemoveLateTick(ILateTick t) { _lateTicks = _lateTicks.Where((value) => value != t).ToArray(); }
/// <summary> /// Adds a Late Tick /// </summary> /// <param name="t">Late Tick</param> public void AddLateTick(ILateTick t) { _lateTicks = _lateTicks.Concat(new ILateTick[] { t }).ToArray(); }
/// <summary> /// Tells if it contains a Late Tick /// </summary> /// <param name="t">Late Tick</param> /// <returns>True if contains that late tick</returns> public bool ContainsLateTick(ILateTick t) { return _lateTicks.Contains(t); }