From 23f38230bf2ae22f5c30649d26ea3bf17b260843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 16 Oct 2014 17:10:47 +0200 Subject: TankOnTank: owns Config now --- core/src/ch/asynk/tankontank/TankOnTank.java | 3 +++ core/src/ch/asynk/tankontank/game/Ctrl.java | 4 ++-- 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); -- cgit v1.1-2-g2b99