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