Advertisement
Guest User

Untitled

a guest
Jul 16th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.83 KB | None | 0 0
  1. ....
  2.         yield return CoroutineExLibrary.Timeout(() => curentTurn != ExecutionMonitor.Battle.GetCompletedTurns(), 60).TryCoroutine();
  3. ....
  4.  
  5.  
  6.             public IEnumerator TryCoroutine(IEnumerator Coroutine)
  7.             {
  8.                 _executingCoroutine = Coroutine;
  9.                 while (true)
  10.                 {
  11.                     try
  12.                     {
  13.                         if (!Coroutine.MoveNext())
  14.                         {
  15.                             yield break;
  16.                         }
  17.                     }
  18.                     catch (Exception e)
  19.                     {
  20.                         ReportError(e.GetType() + " recived. Test aborted \n" + e.StackTrace);
  21.                         yield break;
  22.                     }
  23.                     yield return Coroutine.Current;
  24.                 }
  25.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement