예제 #1
0
 public static void Invoke(Action a, TimeMode mode, float time)
 {
     if (time == 0f)
     {
         a();
     }
     else
     {
         var timer = new UTimer(mode);
         timer.Duration      = time;
         timer.TimerElapsed += () =>
         {
             timer.Stop();
             if (a != null)
             {
                 a();
             }
             timer = null;
         };
         timer.Start();
     }
 }