summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust/game
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-01-19 10:36:19 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-01-19 10:36:19 +0100
commit650e16fcfbb3f77f9a877735a2bc02834af66ed9 (patch)
tree28c2f65f7e2fd3d985ddee9b4cbc8c327920910f /core/src/ch/asynk/rustanddust/game
parent2b9cda532770d1e2a209e19e3aa83e8f3dc6d8c3 (diff)
downloadRustAndDust-650e16fcfbb3f77f9a877735a2bc02834af66ed9.zip
RustAndDust-650e16fcfbb3f77f9a877735a2bc02834af66ed9.tar.gz
Ctrl: add getCtrl(GameMode)
Diffstat (limited to 'core/src/ch/asynk/rustanddust/game')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Ctrl.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java
index e793ba0..302ca87 100644
--- a/core/src/ch/asynk/rustanddust/game/Ctrl.java
+++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java
@@ -4,6 +4,7 @@ import com.badlogic.gdx.utils.Disposable;
import ch.asynk.rustanddust.RustAndDust;
import ch.asynk.rustanddust.ui.Position;
+import ch.asynk.rustanddust.game.ctrl.Solo;
import ch.asynk.rustanddust.game.State.StateType;
import ch.asynk.rustanddust.game.states.StateCommon;
import ch.asynk.rustanddust.game.states.StateSelect;
@@ -45,6 +46,17 @@ public abstract class Ctrl implements Disposable
private StateType stateType;
private StateType stateAfterAnimation;
+ public static Ctrl getCtrl(final RustAndDust game)
+ {
+ Ctrl ctrl = null;
+ switch(game.config.gameMode) {
+ case SOLO:
+ ctrl = new Solo(game, game.config.battle);
+ break;
+ }
+ return ctrl;
+ }
+
public Ctrl(final RustAndDust game, final Battle battle)
{
game.ctrl = this;