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); }
private void OnEnable() { UnityEngine.Object.DontDestroyOnLoad(base.gameObject); TickComponent.Instance = this; }