Exemplo n.º 1
0
        public JSValue Yield(YieldInstruction yieldInstruction)
        {
            if (_isValid)
            {
                if (_coroutines == null)
                {
                    var go = _runtime.GetContainer();
                    if (go != null)
                    {
                        _coroutines = go.AddComponent <CoroutineManager>();
                    }
                }
            }

            if (_coroutines != null)
            {
                return(_coroutines.Yield(this, yieldInstruction));
            }

            return(JSApi.JS_UNDEFINED);
        }
Exemplo n.º 2
0
 public CoroutineManager GetCoroutineManager()
 {
     if (_isValid)
     {
         if (_coroutines == null)
         {
             var go = _runtime.GetContainer();
             if (go != null)
             {
                 _coroutines = go.AddComponent <CoroutineManager>();
             }
         }
     }
     return(_coroutines);
 }