Android Open Source - acceptableLosses Splash Screen From Project Back to project page acceptableLosses .
License The source code is released under:
MIT License
If you think the Android project acceptableLosses listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code package acceptableLosses.screens;
/ / w w w . j a v a 2 s . c o m
import acceptableLosses.AcceptableLossesGame;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
public class SplashScreen implements Screen {
private AcceptableLossesGame game;
private SpriteBatch spriteBatch;
private BitmapFont font;
public SplashScreen(AcceptableLossesGame g) {
game = g;
spriteBatch = new SpriteBatch();
font = new BitmapFont();
font.setColor(0.5f, 0.4f, 0, 1);
}
@Override
public void render(float delta) {
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
spriteBatch.begin();
font.setColor(1f, 1f, 0.25f, 1);
font.draw(spriteBatch, "Start Game" , Gdx.graphics.getWidth() / 2f, Gdx.graphics.getHeight() / 2f);
spriteBatch.end();
if (Gdx.input.isKeyJustPressed(Input.Keys.ENTER) || Gdx.input.isTouched()) {
game.setScreen(new GameScreen(game));
}
}
@Override
public void show() {
}
@Override
public void resize(int width, int height) {
}
@Override
public void hide() {
}
@Override
public void pause() {
}
@Override
public void resume() {
}
@Override
public void dispose() {
spriteBatch.dispose();
}
}
Java Source Code List acceptableLosses.AcceptableLossesGame.java acceptableLosses.android.AndroidLauncher.java acceptableLosses.assets.AssetLoader.java acceptableLosses.assets.FurnitureType.java acceptableLosses.assets.TileType.java acceptableLosses.components.Appearance.java acceptableLosses.components.Cargo.java acceptableLosses.components.Citizen.java acceptableLosses.components.Destination.java acceptableLosses.components.Health.java acceptableLosses.components.Path.java acceptableLosses.components.Position.java acceptableLosses.components.Resume.java acceptableLosses.components.Sentience.java acceptableLosses.components.Task.java acceptableLosses.controls.GestureDetectorController.java acceptableLosses.controls.InputManager.java acceptableLosses.controls.ZoomInputProcessor.java acceptableLosses.controls.commands.Command.java acceptableLosses.controls.commands.TapCommand.java acceptableLosses.desktop.DesktopLauncher.java acceptableLosses.desktop.ImagePacker.java acceptableLosses.map.AsteroidGenerator.java acceptableLosses.map.Chunk.java acceptableLosses.map.Furniture.java acceptableLosses.map.MapTools.java acceptableLosses.map.Region.java acceptableLosses.map.Spawner.java acceptableLosses.pathing.FastNonOptimalHeuristic.java acceptableLosses.screens.GameScreen.java acceptableLosses.screens.SplashScreen.java acceptableLosses.systems.AiSystem.java acceptableLosses.systems.AppearanceRenderSystem.java acceptableLosses.systems.ElevationSystem.java acceptableLosses.systems.FurnitureRenderSystem.java acceptableLosses.systems.JobAssignerSystem.java acceptableLosses.systems.MapRenderSystem.java acceptableLosses.systems.MovementSystem.java acceptableLosses.systems.PathFinderSystem.java acceptableLosses.work.CivilianMover.java acceptableLosses.work.jobs.DigJob.java acceptableLosses.work.jobs.Job.java