summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-11-20 15:54:07 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-11-20 15:54:07 +0100
commitb706be0519cfa130acf4e4f4ae9f9827762c8109 (patch)
tree068939e1e2be4c2aedff312ff0237d46526a632f /core
parentc2e4fec0d0f32f5abbd609e5778fc1710732400f (diff)
downloadRustAndDust-b706be0519cfa130acf4e4f4ae9f9827762c8109.zip
RustAndDust-b706be0519cfa130acf4e4f4ae9f9827762c8109.tar.gz
Map: hex overlay file is given by Factory
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Map.java6
-rw-r--r--core/src/ch/asynk/rustanddust/game/battles/Factory.java4
-rw-r--r--core/src/ch/asynk/rustanddust/game/battles/MapA.java4
-rw-r--r--core/src/ch/asynk/rustanddust/game/battles/MapB.java4
4 files changed, 9 insertions, 9 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Map.java b/core/src/ch/asynk/rustanddust/game/Map.java
index e0134cb..ade2ceb 100644
--- a/core/src/ch/asynk/rustanddust/game/Map.java
+++ b/core/src/ch/asynk/rustanddust/game/Map.java
@@ -59,10 +59,10 @@ public abstract class Map extends Board implements MoveToAnimationCb, ObjectiveS
protected abstract void setup();
- public Map(final RustAndDust game, String textureName)
+ public Map(final RustAndDust game, String map, String hex)
{
- super(game.factory, game.manager.get(textureName, Texture.class),
- new SelectedTile(game.manager.get("data/hex.png", Texture.class), new float[] {.2f, .1f, .1f, .1f, .2f, .1f} ));
+ super(game.factory, game.manager.get(map, Texture.class),
+ new SelectedTile(game.manager.get(hex, Texture.class), new float[] {.2f, .1f, .1f, .1f, .2f, .1f} ));
this.ctrl = game.ctrl;
this.destroy = new DestroyAnimation();
this.tankMoveSound = game.manager.get("sounds/tank_move.mp3", Sound.class);
diff --git a/core/src/ch/asynk/rustanddust/game/battles/Factory.java b/core/src/ch/asynk/rustanddust/game/battles/Factory.java
index 2e128d3..926d82a 100644
--- a/core/src/ch/asynk/rustanddust/game/battles/Factory.java
+++ b/core/src/ch/asynk/rustanddust/game/battles/Factory.java
@@ -84,10 +84,10 @@ public class Factory implements Board.TileBuilder, Disposable
Map m = null;
switch(t) {
case MAP_A:
- m = new MapA(game, "data/map_a.png");
+ m = new MapA(game, "data/map_a.png", "data/hex.png");
break;
case MAP_B:
- m = new MapB(game, "data/map_b.png");
+ m = new MapB(game, "data/map_b.png", "data/hex.png");
break;
}
diff --git a/core/src/ch/asynk/rustanddust/game/battles/MapA.java b/core/src/ch/asynk/rustanddust/game/battles/MapA.java
index f7d33c4..8e772b8 100644
--- a/core/src/ch/asynk/rustanddust/game/battles/MapA.java
+++ b/core/src/ch/asynk/rustanddust/game/battles/MapA.java
@@ -8,9 +8,9 @@ import ch.asynk.rustanddust.game.Hex;
public class MapA extends Map
{
- public MapA(final RustAndDust game, String textureName)
+ public MapA(final RustAndDust game, String map, String hex)
{
- super(game, textureName);
+ super(game, map, hex);
}
@Override
diff --git a/core/src/ch/asynk/rustanddust/game/battles/MapB.java b/core/src/ch/asynk/rustanddust/game/battles/MapB.java
index 2b8838c..f882f69 100644
--- a/core/src/ch/asynk/rustanddust/game/battles/MapB.java
+++ b/core/src/ch/asynk/rustanddust/game/battles/MapB.java
@@ -8,9 +8,9 @@ import ch.asynk.rustanddust.game.Hex;
public class MapB extends Map
{
- public MapB(final RustAndDust game, String textureName)
+ public MapB(final RustAndDust game, String map, String hex)
{
- super(game, textureName);
+ super(game, map, hex);
}
@Override