Пример #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);
        }
Пример #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);
            });
        }
Пример #3
0
 public LoadTaskAsync(LoadTask task)
 {
     Task = task;
 }
Пример #4
0
 public void LoadTaskAsync(LoadTask task)
 {
     this._asyncLoader(task);
 }
Пример #5
0
 public void LoadTask(LoadTask task)
 {
     this._loader(task);
 }