summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/game
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-17 10:13:05 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-17 10:13:05 +0200
commit7b5f3965cdd36dfc56f0d68357fc9ea1430f2712 (patch)
tree13613c8e322077d31f3dfcdbd1a5b34e48367a8b /core/src/ch/asynk/tankontank/game
parent92917aa0c7612911ae4ebbf005baf96a71e3e9b1 (diff)
downloadRustAndDust-7b5f3965cdd36dfc56f0d68357fc9ea1430f2712.zip
RustAndDust-7b5f3965cdd36dfc56f0d68357fc9ea1430f2712.tar.gz
Factory: has a TankOnTank ref
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-rw-r--r--core/src/ch/asynk/tankontank/game/Ctrl.java2
-rw-r--r--core/src/ch/asynk/tankontank/game/Factory.java12
2 files changed, 10 insertions, 4 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java
index ad8c37f..8c7a840 100644
--- a/core/src/ch/asynk/tankontank/game/Ctrl.java
+++ b/core/src/ch/asynk/tankontank/game/Ctrl.java
@@ -40,7 +40,7 @@ public class Ctrl implements Disposable
this.players[0] = game.factory.getPlayer(Army.GE);
this.players[1] = game.factory.getPlayer(Army.US);
- this.map = game.factory.getMap(game, Factory.MapType.MAP_A);
+ this.map = game.factory.getMap(Factory.MapType.MAP_A);
game.factory.fakeSetup(map, players[0], players[1]);
player = (new java.util.Random()).nextInt(2);
diff --git a/core/src/ch/asynk/tankontank/game/Factory.java b/core/src/ch/asynk/tankontank/game/Factory.java
index cecfab6..5b60dc7 100644
--- a/core/src/ch/asynk/tankontank/game/Factory.java
+++ b/core/src/ch/asynk/tankontank/game/Factory.java
@@ -28,10 +28,16 @@ public class Factory implements Board.TileBuilder, Disposable
}
private TextureAtlas atlas;
+ private final TankOnTank game;
- public void setAtlas(TextureAtlas atlas)
+ public Factory(final TankOnTank game)
{
- this.atlas = atlas;
+ this.game = game;
+ }
+
+ public void assetsLoaded()
+ {
+ this.atlas = game.manager.get("data/assets.atlas", TextureAtlas.class);
}
@Override
@@ -57,7 +63,7 @@ public class Factory implements Board.TileBuilder, Disposable
return cfg;
}
- public Map getMap(final TankOnTank game, MapType t)
+ public Map getMap(MapType t)
{
Board.Config cfg = config();