Beispiel #1
0
        //同步加载资源
        public void LoadTask(LoadTask task)
        {
            if (task.IsDone)
            {
                return;
            }

            Object asset = Load(task.Path);

            task.IsDone      = true;
            task.LoadedAsset = asset;
            NewLoaded(task.Path, asset);
        }
Beispiel #2
0
        //异步加载资源
        public void LoadTaskAsync(LoadTask task)
        {
            if (task.IsDone)
            {
                return;
            }

            LoadAsync(task.Path, (obj) =>
            {
                task.IsDone      = true;
                task.LoadedAsset = obj;
                NewLoaded(task.Path, obj);
            });
        }
Beispiel #3
0
 public LoadTaskAsync(LoadTask task)
 {
     Task = task;
 }
 public void LoadTaskAsync(LoadTask task)
 {
     this._asyncLoader(task);
 }
 public void LoadTask(LoadTask task)
 {
     this._loader(task);
 }