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); }
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); }
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); }