public static void Add(DelayedDelegateGameObject method, GameObject param, float delay) { PreAdd(); delayedDelegatesGameObject.Add(method); delayedDelegatesTimeGameObject.Add(Time.fixedTime + delay); delegateParametersGameObject.Add(param); }
public static void RunAll(DelayedDelegateGameObject method) { for (int x = delayedDelegatesGameObject.Count - 1; x >= 0; x--) { if (delayedDelegatesGameObject[x] == method) { delayedDelegatesTimeGameObject[x] = Time.fixedTime; } } DelayedDelegates.RunDelegates(); }
public static void RemoveAll(DelayedDelegateGameObject method) { for (int x = delayedDelegatesGameObject.Count - 1; x >= 0; x--) { if (delayedDelegatesGameObject[x] == method) { delayedDelegatesGameObject.RemoveAt(x); delayedDelegatesTimeGameObject.RemoveAt(x); delegateParametersGameObject.RemoveAt(x); } } }