Android Open Source - SimpleGame Loading Screen






From Project

Back to project page SimpleGame.

License

The source code is released under:

GNU General Public License

If you think the Android project SimpleGame 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 ru.rs.screens;
/*w w w. j  ava 2  s .  co m*/
import ru.rs.Resources;
import ru.rs.interfaces.Game;
import ru.rs.interfaces.Graphics;
import ru.rs.objects.Screen;
import android.graphics.Color;

public class LoadingScreen extends Screen {

  public LoadingScreen(Game g) {
    super(g);
  }

  @Override
  public void update(float delta) {
    Graphics graphics = game.getGraphics();
    Resources.dom = graphics.newBitmap("rec_y.png");
    Resources.unit = graphics.newBitmap("unit.png");
    Resources.enemyHouse = graphics.newBitmap("rec_dy");
  }

  @Override
  public void render(float delta) {
    Graphics g = game.getGraphics();

    g.drawBitmap(Resources.dom, 0, 50);

    g.drawBitmap(Resources.unit, 100, 50);

    g.drawText("DONE!", g.getWidth() / 2, g.getHeight() / 2, Color.RED);
    game.setScreen(new CollisionScreen(game));

  }

}




Java Source Code List

ru.rs.Resources.java
ru.rs.SimpleGame.java
ru.rs.gameobjects.Castle.java
ru.rs.gameobjects.DynamicObject.java
ru.rs.gameobjects.GeneralGrid.java
ru.rs.gameobjects.Side.java
ru.rs.gameobjects.SimpleGameWorld.java
ru.rs.gameobjects.SimpleObject.java
ru.rs.gameobjects.Unit.java
ru.rs.screens.CollisionScreen.java
ru.rs.screens.LoadingScreen.java
ru.rs.screens.MenuScreen.java