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