示例#1
0
 public static void AddLateTick(ILateTick tick)
 {
     if (!lateTicksRecord.ContainsKey(tick))
     {
         lateTicksRecord[tick] = lateTicks.AddLast(tick);
     }
 }
示例#2
0
        public static void RemoveLateTick(ILateTick tick)
        {
            LinkedListNode <ILateTick> node;

            if (lateTicksRecord.TryGetValue(tick, out node))
            {
                lateTicks.Remove(node);

                lateTicksRecord.Remove(tick);
            }
        }
示例#3
0
        public static void LateTick()
        {
            LinkedListNode <ILateTick> node = lateTicks.First;

            while (node != null)
            {
                ILateTick tick = node.Value;
                node = node.Next;

                tick.OnLateTick();
            }
        }
示例#4
0
 public void AddLateTick(ILateTick lateTick)
 {
     _lateTicks += lateTick.LateUpdate;
 }
示例#5
0
 public void RemoveLateTick(ILateTick lateTick)
 {
     _lateTicks -= lateTick.LateUpdate;
 }
示例#6
0
 /// <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();
 }
示例#7
0
 /// <summary>
 /// Adds a Late Tick
 /// </summary>
 /// <param name="t">Late Tick</param>
 public void AddLateTick(ILateTick t)
 {
     _lateTicks = _lateTicks.Concat(new ILateTick[] { t }).ToArray();
 }
示例#8
0
 /// <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);
 }