Game Development Reference
In-Depth Information
// enable texture filtering for pixel smoothing
for (Texture t : atlas.getTextures())
t.setFilter(TextureFilter.Linear, TextureFilter.Linear);
// create game resource objects
fonts = new AssetFonts();
bunny = new AssetBunny(atlas);
rock = new AssetRock(atlas);
goldCoin = new AssetGoldCoin(atlas);
feather = new AssetFeather(atlas);
levelDecoration = new AssetLevelDecoration(atlas);
sounds = new AssetSounds(assetManager);
music = new AssetMusic(assetManager);
}
These changes tell the asset manager to load and manage every audio file that we
want to use in the game. We are now all set to play back our audio files. However,
the game should also respect the current audio settings that are available in the
Options menu of the menu screen, as shown in the following screenshot:
 
Search WWH ::




Custom Search