public static void Skip(DelayedDelegateInt method, int param, int skipFrames) { PreAdd(); delayedDelegatesInt.Add(method); delayedDelegatesTimeInt.Add(0); delayedDelegatesIntRealtime.Add(false); delayedDelegatesIntFrame.Add(Time.frameCount + skipFrames); delegateParametersInt.Add(param); }
public static void Add(DelayedDelegateInt method, int param, float delay) { PreAdd(); delayedDelegatesInt.Add(method); delayedDelegatesTimeInt.Add(Time.fixedTime + delay); delayedDelegatesIntRealtime.Add(false); delayedDelegatesIntFrame.Add(0); delegateParametersInt.Add(param); }
public static void RunAll(DelayedDelegateInt method) { for (int x = delayedDelegatesInt.Count - 1; x >= 0; x--) { if (delayedDelegatesInt[x] == method) { delayedDelegatesTimeInt[x] = Time.fixedTime; delayedDelegatesIntRealtime[x] = false; delayedDelegatesIntFrame[x] = 0; } } DelayedDelegates.RunDelegates(); }
public static void RemoveAll(DelayedDelegateInt method) { for (int x = delayedDelegatesInt.Count - 1; x >= 0; x--) { if (delayedDelegatesInt[x] == method) { delayedDelegatesInt.RemoveAt(x); delayedDelegatesTimeInt.RemoveAt(x); delegateParametersInt.RemoveAt(x); delayedDelegatesIntFrame.RemoveAt(x); delayedDelegatesIntRealtime.RemoveAt(x); } } }