Пример #1
0
 public static void ExecuteSchedule()
 {
     lock (_events)
     {
         for (int i = _events.Count - 1; i >= 0; --i)
         {
             ScheduledEvent e = _events[i];
             //if (System.DateTime.Now >= e.targetTime)
             if (Time.time >= e.targetTime)
             {
                 _events.RemoveAt(i);
                 if (e.funcPointer != null)
                 {
                     e.funcPointer();
                 }
                 else if (e.paramFuncPointer != null)
                 {
                     e.paramFuncPointer(e.paramiters);
                 }
             }
         }
     } // end lock
 }