Esempio n. 1
0
 public void AsyncLoadScene(string resName, Action <bool> callback, bool isAdditive)
 {
     if (this.coroutineQueue == null)
     {
         this.coroutineQueue = new SingleLoader(new Func <IEnumerator, Coroutine>(GameManager.Instance.StartCoroutine));
     }
     this.m_currentCallback = callback;
     this.coroutineQueue.Enqueue(this.AsyncOnDoing(SceneManager.LoadSceneAsync(Path.GetFileNameWithoutExtension(resName), (!isAdditive) ? 0 : 1)));
 }
Esempio n. 2
0
 public void AsyncLoadAssetWithType(string resName, Type type, AssetCallback callback)
 {
     if (resName.Contains("Scenes/s") && Path.GetDirectoryName(resName) == "Scenes")
     {
         callback(null);
     }
     else
     {
         if (this.coroutineQueue == null)
         {
             this.coroutineQueue = new SingleLoader(new Func <IEnumerator, Coroutine>(GameManager.Instance.StartCoroutine));
         }
         this.coroutineQueue.Enqueue(this.AsyncOnLoadAsset(resName, type, callback));
     }
 }