Back to project page Castle-Invaders.
The source code is released under:
GNU General Public License
If you think the Android project Castle-Invaders 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.noobygames.castleinvaders; /* ww w .j a v a 2s.c o m*/ import com.badlogic.gdx.Game; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Preferences; import com.badlogic.gdx.graphics.g2d.BitmapFont; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.noobygames.castleinvaders.screens.SplashScreen; /**@author Tobi**/ public class CastleInvaders extends Game { public SpriteBatch batch; public BitmapFont font; public Preferences prefs; /**Initialises a font and spritebatcher aswell as the preferences. * finally sets the screen to a new object of Splashscreen**/ public void create() { batch = new SpriteBatch(); font = new BitmapFont(); prefs = Gdx.app.getPreferences("CastleInvaders"); this.setScreen(new SplashScreen(this)); } public void render() { super.render(); // important! } public void dispose() { batch.dispose(); font.dispose(); } }