From 41d8518890fc5d1dbc0b9b9d411687972833cffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Fri, 9 Apr 2021 15:09:47 +0200 Subject: [PATCH] fix: BaseGame not needed (for now?) --- core/src/sagittarius/BaseGame.java | 18 ---------------- core/src/sagittarius/SagittariusGame.java | 26 ++++++++++++++++------- 2 files changed, 18 insertions(+), 26 deletions(-) delete mode 100644 core/src/sagittarius/BaseGame.java diff --git a/core/src/sagittarius/BaseGame.java b/core/src/sagittarius/BaseGame.java deleted file mode 100644 index d707e64..0000000 --- a/core/src/sagittarius/BaseGame.java +++ /dev/null @@ -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); - } -} \ No newline at end of file diff --git a/core/src/sagittarius/SagittariusGame.java b/core/src/sagittarius/SagittariusGame.java index f69aaf1..56a8639 100644 --- a/core/src/sagittarius/SagittariusGame.java +++ b/core/src/sagittarius/SagittariusGame.java @@ -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()); } - -} +} \ No newline at end of file