From 80d112498d3dbf5226490687d38e3059a18cc578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 14 Jan 2016 22:00:37 +0100 Subject: add game.ctrl.solo: first step into multimode game --- core/src/ch/asynk/rustanddust/game/Ctrl.java | 2 +- core/src/ch/asynk/rustanddust/game/ctrl/Solo.java | 13 +++++++++++++ core/src/ch/asynk/rustanddust/screens/GameScreen.java | 3 ++- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 core/src/ch/asynk/rustanddust/game/ctrl/Solo.java diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java index 4bb0893..e793ba0 100644 --- a/core/src/ch/asynk/rustanddust/game/Ctrl.java +++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java @@ -17,7 +17,7 @@ import ch.asynk.rustanddust.game.states.StateReinforcement; import ch.asynk.rustanddust.game.states.StateDeployment; import ch.asynk.rustanddust.game.states.StateWithdraw; -public class Ctrl implements Disposable +public abstract class Ctrl implements Disposable { public final RustAndDust game; public final Battle battle; diff --git a/core/src/ch/asynk/rustanddust/game/ctrl/Solo.java b/core/src/ch/asynk/rustanddust/game/ctrl/Solo.java new file mode 100644 index 0000000..b1ad673 --- /dev/null +++ b/core/src/ch/asynk/rustanddust/game/ctrl/Solo.java @@ -0,0 +1,13 @@ +package ch.asynk.rustanddust.game.ctrl; + +import ch.asynk.rustanddust.RustAndDust; +import ch.asynk.rustanddust.game.Ctrl; +import ch.asynk.rustanddust.game.Battle; + +public class Solo extends Ctrl +{ + public Solo(final RustAndDust game, final Battle battle) + { + super(game, battle); + } +} diff --git a/core/src/ch/asynk/rustanddust/screens/GameScreen.java b/core/src/ch/asynk/rustanddust/screens/GameScreen.java index a1e759f..cc49263 100644 --- a/core/src/ch/asynk/rustanddust/screens/GameScreen.java +++ b/core/src/ch/asynk/rustanddust/screens/GameScreen.java @@ -19,6 +19,7 @@ import com.badlogic.gdx.math.Vector3; import ch.asynk.rustanddust.RustAndDust; import ch.asynk.rustanddust.game.Ctrl; +import ch.asynk.rustanddust.game.ctrl.Solo; public class GameScreen implements Screen { @@ -58,7 +59,7 @@ public class GameScreen implements Screen this.blocked = false; this.batch = new SpriteBatch(); - this.ctrl = new Ctrl(game, game.config.battle); + this.ctrl = new Solo(game, game.config.battle); this.cam = new GameCamera(ctrl.map.getWidth(), ctrl.map.getHeight(), ZOOM_OUT_MAX, ZOOM_IN_MAX, game.hudCorrection, FIXED_HUD); if (DEBUG) this.debugShapes = new ShapeRenderer(); -- cgit v1.1-2-g2b99