예제 #1
0
        /// <summary>
        /// Wait inside a coroutine till this future comes true
        /// </summary>
        /// <returns></returns>
        public IEnumerator CoWait(int timeout = -1)
        {
            long waitTill = AsyncManagerImpl.getCurrentTimeMs() + timeout;

            while (!finished)
            {
                yield return(null);

                if (timeout != -1 && AsyncManagerImpl.getCurrentTimeMs() > waitTill)
                {
                    Debug.LogWarning("TIMEOUT COWait!");
                    break;
                }
            }
        }
예제 #2
0
 public API(AsyncManagerImpl instance)
 {
     this.instance = instance;
 }