public MusicManager()
 {
     //非mono调用update方法
     MonoManager.GetInstance().AddUpdateListener(Update);
 }
 public InputController()
 {
     MonoManager.GetInstance().AddUpdateListener(Update);
 }
Beispiel #3
0
 /// <summary>
 /// 异步加载资源
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="name"></param>
 /// <param name="loadComplete"></param>
 public void LoadResAsync <T>(string name, Action <T> loadComplete) where T : UnityEngine.Object
 {
     MonoManager.GetInstance().StartCoroutine(WaitForLoadAsync(name, loadComplete));
 }
 public void LoadSceneAsync(string name, Action loadCompleteAction)
 {
     //非mono方法调用协程
     MonoManager.GetInstance().StartCoroutine(LoadSceneAsyncCoroutine(name, loadCompleteAction));
 }