Example #1
0
 protected void AddCallback(LoaderDelegate callback)
 {
     if (callback != null)
     {
         mFinishCallback.Add(callback);
     }
 }
Example #2
0
        public static AssetBundleLoader Load(string url, LoaderDelegate callback = null, LoaderMode mode = LoaderMode.Sync)
        {
            var loader = AutoNew <AssetBundleLoader>(url, callback, false, mode);

            //Create new Loader
            return(loader);
        }
Example #3
0
 public static void Init(GameObject root, LoaderDelegate loader)
 {
     Root = root;
     if (null != loader)
     {
         Loader = loader;
     }
 }
Example #4
0
        public static T AutoNew <T>(string url, LoaderDelegate callback, bool forceCreateNew = false, LoaderMode mode = LoaderMode.Sync)
            where T : AbstractResourceLoader, new()
        {
            if (callback != null)
            {
                mLoaderCallback = callback;
            }
            T loader = new T();

            loader.Init(url, mode);
            return(loader);
        }
Example #5
0
 static UIManager()
 {
     Loader = DefaultLoader;
 }
Example #6
0
 public static void SetLoadFun(LoaderDelegate fun)
 {
     loaderHandler = fun;
 }
Example #7
0
 public ObservedBinding(ControlType control, ObserverDelegate saveDelegate, LoaderDelegate loadDelegate)
 {
     this.control = control;
     this.onLoad  = loadDelegate;
     this.onSave  = saveDelegate;
 }
Example #8
0
        public static AssetFileLoader Load(string url, LoaderDelegate callback, LoaderMode mode = LoaderMode.Sync)
        {
            var loader = AutoNew <AssetFileLoader>(url, callback, false, mode);

            return(loader);
        }
Example #9
0
        public AbstractResourceLoader LoadBundleAsync(string path, LoaderDelegate callback = null)
        {
            var loader = AssetFileLoader.Load(path, callback, LoaderMode.Async);

            return(loader);
        }