fix: BaseGame not needed (for now?)
This commit is contained in:
parent
56bde9124c
commit
41d8518890
|
@ -1,18 +0,0 @@
|
|||
package sagittarius;
|
||||
|
||||
import com.badlogic.gdx.Game;
|
||||
|
||||
import sagittarius.view.BaseScreen;
|
||||
|
||||
public abstract class BaseGame extends Game {
|
||||
|
||||
private static BaseGame game;
|
||||
|
||||
public BaseGame() {
|
||||
game = this;
|
||||
}
|
||||
|
||||
public static void setActiveScreen(BaseScreen s) {
|
||||
game.setScreen(s);
|
||||
}
|
||||
}
|
|
@ -1,18 +1,28 @@
|
|||
package sagittarius;
|
||||
|
||||
import sagittarius.view.*;
|
||||
import com.badlogic.gdx.Game;
|
||||
|
||||
public class SagittariusGame extends BaseGame {
|
||||
import sagittarius.view.BaseScreen;
|
||||
import sagittarius.view.GameScreen;
|
||||
|
||||
// ---------- CONSTANTs ----------
|
||||
public class SagittariusGame extends Game {
|
||||
|
||||
public static final float G = 100;
|
||||
private static SagittariusGame game;
|
||||
|
||||
public SagittariusGame() {
|
||||
game = this;
|
||||
}
|
||||
|
||||
// ---------- METHODs ----------
|
||||
public static void setActiveScreen(BaseScreen s) {
|
||||
game.setScreen(s);
|
||||
}
|
||||
|
||||
public static BaseScreen getActiveScreen() {
|
||||
return (BaseScreen) game.getScreen();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create() {
|
||||
this.setScreen(new StartScreen());
|
||||
this.setScreen(new GameScreen());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue