static public void Remove(Action callback) { EnterFrame.init(); int i = callbacks.Count - 1; while (i >= 0) { if (callbacks[i] == callback) { callbacks.RemoveAt(i); } i--; } if (callbacks.Count == 0) { tick.running.Value = false; } }
static public void AddAt(Action callback, int index) { EnterFrame.init(); tick.running.Value = true; callbacks.Insert(index, callback); }
static public void Add(Action callback) { EnterFrame.init(); tick.running.Value = true; callbacks.Add(callback); }