diff options
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r-- | core/src/ch/asynk/tankontank/screens/AbstractScreen.java | 25 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/screens/GameScreen.java | 7 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/screens/LoadScreen.java | 6 |
3 files changed, 9 insertions, 29 deletions
diff --git a/core/src/ch/asynk/tankontank/screens/AbstractScreen.java b/core/src/ch/asynk/tankontank/screens/AbstractScreen.java deleted file mode 100644 index fd51a52..0000000 --- a/core/src/ch/asynk/tankontank/screens/AbstractScreen.java +++ /dev/null @@ -1,25 +0,0 @@ -package ch.asynk.tankontank.screens; - -import com.badlogic.gdx.Screen; - -import ch.asynk.tankontank.TankOnTank; - -public abstract class AbstractScreen implements Screen -{ - - protected final TankOnTank game; - - public AbstractScreen(TankOnTank game) - { - this.game = game; - } - - @Override - public void pause() { } - - @Override - public void resume() { } - - @Override - public void dispose() { } -} diff --git a/core/src/ch/asynk/tankontank/screens/GameScreen.java b/core/src/ch/asynk/tankontank/screens/GameScreen.java index 731db63..1dde462 100644 --- a/core/src/ch/asynk/tankontank/screens/GameScreen.java +++ b/core/src/ch/asynk/tankontank/screens/GameScreen.java @@ -2,6 +2,7 @@ package ch.asynk.tankontank.screens; import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.Screen; import com.badlogic.gdx.Input; import com.badlogic.gdx.InputAdapter; import com.badlogic.gdx.InputMultiplexer; @@ -37,13 +38,15 @@ import ch.asynk.tankontank.game.Pawn; import ch.asynk.tankontank.game.MapImage; // addActor import ch.asynk.tankontank.game.Unit; // addActor -public class GameScreen extends AbstractScreen +public class GameScreen implements Screen { private static final float ZOOM_MAX = 0.2f; private static final float ZOOM_GESTURE_FACTOR = .01f; private static final float ZOOM_SCROLL_FACTOR = .1f; private static final int DRAGGED_Z_INDEX = 10; + private final TankOnTank game; + private float maxZoomOut; final OrthographicCamera cam; @@ -63,7 +66,7 @@ public class GameScreen extends AbstractScreen public GameScreen(final TankOnTank game) { - super(game); + this.game = game; GameFactory.init(game.manager); diff --git a/core/src/ch/asynk/tankontank/screens/LoadScreen.java b/core/src/ch/asynk/tankontank/screens/LoadScreen.java index ef0de5f..8d586db 100644 --- a/core/src/ch/asynk/tankontank/screens/LoadScreen.java +++ b/core/src/ch/asynk/tankontank/screens/LoadScreen.java @@ -14,8 +14,10 @@ import com.badlogic.gdx.utils.viewport.FitViewport; import ch.asynk.tankontank.TankOnTank; import ch.asynk.tankontank.loading.LoadingBar; -public class LoadScreen extends AbstractScreen +public class LoadScreen implements Screen { + private final TankOnTank game; + private Stage stage; private Image logo; @@ -34,7 +36,7 @@ public class LoadScreen extends AbstractScreen public LoadScreen(final TankOnTank game) { - super(game); + this.game = game; } @Override |