Back to project page RubeLoader.
The source code is released under:
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUC...
If you think the Android project RubeLoader listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.gushikustudios.rube.loader; /* w w w . ja v a 2 s . c o m*/ import com.badlogic.gdx.assets.AssetDescriptor; import com.badlogic.gdx.assets.AssetLoaderParameters; import com.badlogic.gdx.assets.AssetManager; import com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader; import com.badlogic.gdx.assets.loaders.FileHandleResolver; import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.physics.box2d.World; import com.badlogic.gdx.utils.Array; import com.gushikustudios.rube.RubeScene; public class RubeSceneAsyncLoader extends AsynchronousAssetLoader<RubeScene, RubeSceneAsyncLoader.RubeSceneParameters> { private final RubeSceneLoader mLoader; private RubeScene mScene; static public class RubeSceneParameters extends AssetLoaderParameters<RubeScene> { } public RubeSceneAsyncLoader(FileHandleResolver resolver) { this(null,resolver); } /** * Specifies a pre-defined Box2D world to add scene objects to. * * @param world * @param resolver */ public RubeSceneAsyncLoader(World world, FileHandleResolver resolver) { super(resolver); mLoader = new RubeSceneLoader(world); } @SuppressWarnings("rawtypes") @Override public Array<AssetDescriptor> getDependencies(String fileName, FileHandle file, RubeSceneParameters parameter) { return null; } @Override public void loadAsync(AssetManager manager, String fileName, FileHandle file, RubeSceneParameters parameter) { mScene = null; mScene = mLoader.addScene(file); } @Override public RubeScene loadSync(AssetManager manager, String fileName, FileHandle file, RubeSceneParameters parameter) { return mScene; } }