Both the Desktop Launcher and Android Launcher call this class:
public class AGame extends Game {
BaseGame bg; //a screen class
BaseGameAndroid bga; //a screen class
@Override
public void create() {
switch(Gdx.app.getType()) {
case Android:
System.out.println("Running Android...\n");
initb();
setScreen(bga);
break;
case Desktop:
System.out.println("Running Desktop...\n");
inita();
setScreen(bg);
break;
case WebGL: //Html5
break;
default:
System.out.println("IT BROKE!");
break;
}
}
public void inita() {
bg = new BaseGame(this);
}
public void initb() {
bga = new BaseGameAndroid(this);
}
}
When I use Desktop, it simply runs the BaseGame class. On Android, it shows exactly what the desktop shows. My eclipse android emulator wont find the game anymore so I test it with bluestacks and my phone. Bluestacks runs it with W,A,S,D support and my phone just runs it (Haven’t added controls).
Is there something wrong with the way I choose the platforms?