Esempio n. 1
0
 public MyTimer(delegateFunction function)
 {
     this.function       = function;
     thread              = new Thread(timer);
     thread.IsBackground = true;
     thread.Start();
 }
Esempio n. 2
0
 //
 public virtual object ManagerAction(delegateFunction func, params object[] pas)
 {
     if (this.statusManager)
     {
         return(SelectFunction(func, pas)); //
     }
     return("Chua dang nhap");
 }
Esempio n. 3
0
 public static int[] Map(this int[] a1, delegateFunction equation)
 {
     for (int i = 0; i < a1.Length; i++)
     {
         a1[i] = equation(a1[i]);
     }
     return(a1);
 }
Esempio n. 4
0
 //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();
 }
Esempio n. 5
0
 //
 protected object SelectFunction(delegateFunction func, params object[] pas)
 {
     return(func(pas));
 }