public MyTimer(delegateFunction function) { this.function = function; thread = new Thread(timer); thread.IsBackground = true; thread.Start(); }
// public virtual object ManagerAction(delegateFunction func, params object[] pas) { if (this.statusManager) { return(SelectFunction(func, pas)); // } return("Chua dang nhap"); }
public static int[] Map(this int[] a1, delegateFunction equation) { for (int i = 0; i < a1.Length; i++) { a1[i] = equation(a1[i]); } return(a1); }
//generic timer for float public static IEnumerator WaitFor(float seconds, delegateFunction functionToExecute) { while (seconds > 0) { seconds -= 0.2f; yield return(new WaitForSeconds(0.2f)); } functionToExecute(); }
// protected object SelectFunction(delegateFunction func, params object[] pas) { return(func(pas)); }