summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-16 17:10:47 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-16 17:10:47 +0200
commit23f38230bf2ae22f5c30649d26ea3bf17b260843 (patch)
tree313a21ab3d5ef95de2f8cd885a5b5a84a7ba15a6 /core/src/ch
parentcb89c0ecf3967c6787016157322a507662f0d652 (diff)
downloadRustAndDust-23f38230bf2ae22f5c30649d26ea3bf17b260843.zip
RustAndDust-23f38230bf2ae22f5c30649d26ea3bf17b260843.tar.gz
TankOnTank: owns Config now
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/tankontank/TankOnTank.java3
-rw-r--r--core/src/ch/asynk/tankontank/game/Ctrl.java4
2 files changed, 5 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/TankOnTank.java b/core/src/ch/asynk/tankontank/TankOnTank.java
index a58d7dc..147d161 100644
--- a/core/src/ch/asynk/tankontank/TankOnTank.java
+++ b/core/src/ch/asynk/tankontank/TankOnTank.java
@@ -10,6 +10,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.Skin;
import ch.asynk.tankontank.screens.LoadScreen;
import ch.asynk.tankontank.game.Factory;
import ch.asynk.tankontank.game.Ctrl;
+import ch.asynk.tankontank.game.Config;
public class TankOnTank extends Game
{
@@ -17,6 +18,7 @@ public class TankOnTank extends Game
public Factory factory;
public Skin skin;
public Ctrl ctrl;
+ public Config config;
@Override
public void create ()
@@ -27,6 +29,7 @@ public class TankOnTank extends Game
manager = new AssetManager();
factory = new Factory();
skin = new Skin(Gdx.files.internal("skin/uiskin.json"));
+ config = new Config();
this.setScreen(new LoadScreen(this));
}
diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java
index 4d8313a..b069e89 100644
--- a/core/src/ch/asynk/tankontank/game/Ctrl.java
+++ b/core/src/ch/asynk/tankontank/game/Ctrl.java
@@ -32,10 +32,10 @@ public class Ctrl implements Disposable
private State state;
- public Ctrl(final TankOnTank game, final Config cfg)
+ public Ctrl(final TankOnTank game)
{
this.game = game;
- this.cfg = cfg;
+ this.cfg = game.config;
game.ctrl = this;
this.players[0] = game.factory.getPlayer(Army.GE);