Пример #1
0
        static IEnumerator RunExecuteAsync(this IRequestAsyncable request, UnityAction <IRequestAsyncable> OnExecutionDone)
        {
            request.isDone = false;
            yield return(request.OnExecuteAsync());

            request.isDone = true;
            OnExecutionDone.Invoke(request);
        }
Пример #2
0
 /// <summary>
 /// Executes the <see cref="Request"/> asynchronously and invoke <paramref name="OnExecutionDone"/> when its done
 /// </summary>
 /// <param name="OnExecutionDone">Will be invoked when request done</param>
 public static void ExecuteAsync(this IRequestAsyncable request, UnityAction <IRequestAsyncable> OnExecutionDone)
 {
     Database.active.StartCoroutine(request.RunExecuteAsync(OnExecutionDone));
 }