Back to project page AndroidShooter.
The source code is released under:
GNU General Public License
If you think the Android project AndroidShooter 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 jonathan.geoffroy.shooter.view.utils; // w w w.jav a 2s.co m import java.util.ArrayList; import com.badlogic.gdx.Game; import com.badlogic.gdx.assets.AssetDescriptor; import com.badlogic.gdx.assets.AssetManager; public class App extends Game { private static AssetManager manager; protected ArrayList<HelpScreen> screens; @Override public void create() { HelpScreen.initialize(this); manager = new AssetManager(); screens = new ArrayList<HelpScreen>(); } public void setScreen(int screenType) { assert(screenType >= 0 && screenType < screens.size()); setScreen(screens.get(screenType)); } public static void loadAssets(ArrayList<AssetDescriptor<Object>> assetDesc) { for(AssetDescriptor<Object> ad : assetDesc) { manager.load(ad); } } public static void clearAssets() { manager.clear(); } public static boolean hasLoaded() { return manager.update(); } public static Object getAsset(String name) { return manager.get(name); } }