public MusicMgr() { MonoMgr.Getinstate().AddUpdateListener(Update); }
/// <summary> /// 构造函数中 添加 Update 监听 /// </summary> public InputMgr() { MonoMgr.Getinstate().AddUpdateListener(MyUpdate); }
//异步加载资源 public void LoadAsync <T>(string name, UnityAction <T> callback) where T : Object { Resources.LoadAsync(name); //开启异步加载的协程 MonoMgr.Getinstate().StartCoroutine(ReallyLoadAsync(name, callback)); }
/// <summary> /// 提供给外部的 异步加载的接口方法 /// </summary> /// <param name="name"></param> /// <param name="fun"></param> public void LoadSceneAsyn(string name, UnityAction fun) { MonoMgr.Getinstate().StartCoroutine(ReallyLoadSceneAsyn(name, fun)); }