示例#1
0
 static Tick()
 {
     Tick.Timed      = new Tick.Entry.List();
     Tick.Update     = new Tick.Entry.List();
     Tick.Late       = new Tick.Entry.List();
     Tick.RemoveList = new List <UnityEngine.Object>(32);
 }
示例#2
0
 public static void AddLateUpdate(UnityEngine.Object obj, Action action, string DebugName)
 {
     TickComponent.Init();
     Tick.Entry.List late  = Tick.Late;
     Tick.Entry      entry = new Tick.Entry()
     {
         TargetObject = obj,
         Function     = action,
         DebugName    = string.Format("{0} - {1}", DebugName, obj.name)
     };
     late.Add(entry);
 }
示例#3
0
 public static void AddTimed(UnityEngine.Object obj, float minDelay, float maxDelay, Action action, string DebugName)
 {
     TickComponent.Init();
     Tick.Entry.List timed = Tick.Timed;
     Tick.Entry      entry = new Tick.Entry()
     {
         TargetObject = obj,
         MinDelay     = minDelay,
         RandDelay    = maxDelay - minDelay,
         Function     = action,
         DebugName    = string.Format("{0} - {1}", DebugName, obj.name)
     };
     timed.Add(entry);
 }