Java 类com.badlogic.gdx.assets.loaders.SynchronousAssetLoader 实例源码

项目:ingress-indonesia-dev    文件:AssetLoadingTask.java   
private void handleSyncLoader()
{
  SynchronousAssetLoader localSynchronousAssetLoader = (SynchronousAssetLoader)this.loader;
  if (!this.dependenciesLoaded)
  {
    this.dependenciesLoaded = true;
    this.dependencies = localSynchronousAssetLoader.getDependencies(this.assetDesc.fileName, this.assetDesc.params);
    if (this.dependencies == null)
      this.asset = localSynchronousAssetLoader.load(this.manager, this.assetDesc.fileName, this.assetDesc.params);
    while (true)
    {
      return;
      Iterator localIterator = this.dependencies.iterator();
      while (localIterator.hasNext())
      {
        AssetDescriptor localAssetDescriptor = (AssetDescriptor)localIterator.next();
        this.manager.injectDependency(this.assetDesc.fileName, localAssetDescriptor);
      }
    }
  }
  this.asset = localSynchronousAssetLoader.load(this.manager, this.assetDesc.fileName, this.assetDesc.params);
}
项目:libgdxcn    文件:AssetLoadingTask.java   
/** Updates the loading of the asset. In case the asset is loaded with an {@link AsynchronousAssetLoader}, the loaders
 * {@link AsynchronousAssetLoader#loadAsync(AssetManager, String, FileHandle, AssetLoaderParameters)} method is first called on
 * a worker thread. Once this method returns, the rest of the asset is loaded on the rendering thread via
 * {@link AsynchronousAssetLoader#loadSync(AssetManager, String, FileHandle, AssetLoaderParameters)}.
 * @return true in case the asset was fully loaded, false otherwise
 * @throws GdxRuntimeException */
public boolean update () {
    ticks++;
    if (loader instanceof SynchronousAssetLoader) {
        handleSyncLoader();
    } else {
        handleAsyncLoader();
    }
    return asset != null;
}
项目:libgdxcn    文件:AssetLoadingTask.java   
private void handleSyncLoader () {
    SynchronousAssetLoader syncLoader = (SynchronousAssetLoader)loader;
    if (!dependenciesLoaded) {
        dependenciesLoaded = true;
        dependencies = syncLoader.getDependencies(assetDesc.fileName, resolve(loader, assetDesc), assetDesc.params);
        if (dependencies == null) {
            asset = syncLoader.load(manager, assetDesc.fileName, resolve(loader, assetDesc), assetDesc.params);
            return;
        }
        manager.injectDependencies(assetDesc.fileName, dependencies);
    } else {
        asset = syncLoader.load(manager, assetDesc.fileName, resolve(loader, assetDesc), assetDesc.params);
    }
}
项目:ingress-indonesia-dev    文件:AssetLoadingTask.java   
public boolean update()
{
  this.ticks = (1 + this.ticks);
  if ((this.loader instanceof SynchronousAssetLoader))
    handleSyncLoader();
  while (this.asset != null)
  {
    return true;
    handleAsyncLoader();
  }
  return false;
}