January 2015
Beginner to intermediate
478 pages
9h 46m
English
We are now ready to test our Assets class with the rest of the already built game code.
We need to add the following two imports to CanyonBunnyMain:
import com.badlogic.gdx.assets.AssetManager; import com.packtpub.libgdx.canyonbunny.game.Assets;
After this, we add the calls to load, reload, and unload our assets with the following changes to the code:
@Override
public void create () {
// Set Libgdx log level to DEBUG
Gdx.app.setLogLevel(Application.LOG_DEBUG);
// Load assets
Assets.instance.init(new AssetManager()); // Initialize controller and renderer worldController = new WorldController(); worldRenderer = new WorldRenderer(worldController); } @Override public void resume () { Assets.instance.init(new AssetManager()); paused ...Read now
Unlock full access