Android Open Source - AndriyVoronaSpaceAttack Vorona Game






From Project

Back to project page AndriyVoronaSpaceAttack.

License

The source code is released under:

GNU General Public License

If you think the Android project AndriyVoronaSpaceAttack 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 com.vorona.game;
//from   ww w  . j  a  va2  s  . c  om
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.utils.Scaling;
import com.badlogic.gdx.utils.viewport.ScalingViewport;

public class VoronaGame extends Game{

  MScreen mScreen;
  GScreen gScreen;
  static LScreen lScreen;
  OrthographicCamera camera;
  Screen dScreen;
  WScreen wScreen;
  AScreen aScreen;
  Assets assets;
  private Stage stage;
  
  @Override
  public void create() {
    
    int width = Gdx.graphics.getWidth();
    int height = Gdx.graphics.getHeight();
    
    camera = new OrthographicCamera();
    camera.setToOrtho(true, width, height);
    
    ScalingViewport view = new ScalingViewport(Scaling.stretch, width, height, camera);
    
    stage = new Stage(view);
    assets = new Assets(stage, this);

    aScreen = new AScreen(this, camera, width, height, assets, view);
    lScreen = new LScreen(this, camera, width, height, assets, view);
    mScreen = new MScreen(this, camera, width, height, assets, view);
    gScreen = new GScreen(camera, width, height, assets, view);
    dScreen = new DScreen(this, camera, width, height, assets, view);
    wScreen = new WScreen(this, camera, width, height, assets, view);
    
    setScreen(lScreen);
  }

  public void setLogoScreen(){
    System.gc();
    setScreen(lScreen);
  }
  
  public void setMenuScreen(){

    System.gc();
    setScreen(mScreen);
  }
  
  public void setGameScreen(){

    System.gc();
    setScreen(gScreen);
  }

  public void setDeadScreen() {

    System.gc();
    // TODO Auto-generated method stub
    setScreen(dScreen);
  }
  
  public void setWinScreen() {

    System.gc();
    // TODO Auto-generated method stub
    setScreen(wScreen);
  }

  public void setAboutScreen() {
    // TODO Auto-generated method stub
    System.gc();
    // TODO Auto-generated method stub
    setScreen(aScreen);
  }
  
}




Java Source Code List

com.vorona.game.AScreen.java
com.vorona.game.Assets.java
com.vorona.game.DScreen.java
com.vorona.game.FontWriter.java
com.vorona.game.GScreen.java
com.vorona.game.LScreen.java
com.vorona.game.MScreen.java
com.vorona.game.VoronaGame.java
com.vorona.game.WScreen.java
com.vorona.game.WaitTimer.java
com.vorona.game.android.AndroidLauncher.java
com.vorona.game.desktop.DesktopLauncher.java