//同步加载资源 public void LoadTask(LoadTask task) { if (task.IsDone) { return; } Object asset = Load(task.Path); task.IsDone = true; task.LoadedAsset = asset; NewLoaded(task.Path, asset); }
//异步加载资源 public void LoadTaskAsync(LoadTask task) { if (task.IsDone) { return; } LoadAsync(task.Path, (obj) => { task.IsDone = true; task.LoadedAsset = obj; NewLoaded(task.Path, obj); }); }
public LoadTaskAsync(LoadTask task) { Task = task; }
public void LoadTaskAsync(LoadTask task) { this._asyncLoader(task); }
public void LoadTask(LoadTask task) { this._loader(task); }