Beispiel #1
0
 // Update is called once per frame
 void Update()
 {
     AsynchronousClient.Update();
     lock (_actions)
     {
         _currentActions.Clear();
         _currentActions.AddRange(_actions);
         _actions.Clear();
     }
     foreach (var a in _currentActions)
     {
         a();
     }
     lock (_delayed)
     {
         _currentDelayed.Clear();
         _currentDelayed.AddRange(_delayed.Where(d => d.time <= Time.time));
         foreach (var item in _currentDelayed)
         {
             _delayed.Remove(item);
         }
     }
     foreach (var delayed in _currentDelayed)
     {
         delayed.action();
     }
 }
Beispiel #2
0
 public void Update()
 {
     asyncClient.Update();
 }