From dad7249b074500d717941e9daf0d52f60ac5395f Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Tue, 28 Oct 2014 11:35:57 +0100 Subject: TileList: extends ArrayList, has a default overlay index, has methods hide()/show() --- core/src/ch/asynk/tankontank/game/HexList.java | 4 ++-- core/src/ch/asynk/tankontank/game/Map.java | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'core/src/ch/asynk/tankontank/game') diff --git a/core/src/ch/asynk/tankontank/game/HexList.java b/core/src/ch/asynk/tankontank/game/HexList.java index 0be4a7da..9ed95fec 100644 --- a/core/src/ch/asynk/tankontank/game/HexList.java +++ b/core/src/ch/asynk/tankontank/game/HexList.java @@ -4,8 +4,8 @@ import ch.asynk.tankontank.engine.TileList; public class HexList extends TileList { - public HexList(Map map, int n) + public HexList(Map map, int overlay, int n) { - super(map, n); + super(map, overlay, n); } } diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java index 8ff031a6..4d66c1b8 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -41,11 +41,11 @@ public abstract class Map extends Board this.explosion = new SpriteAnimation(game.manager.get("data/explosion.png", Texture.class), 10, 4, 40); this.explosions = new SpriteAnimation(game.manager.get("data/explosions.png", Texture.class), 16, 8, 15); setup(); - possibleMoves = new HexList(this, 40); - possiblePaths = new HexList(this, 10); - possibleTargets = new HexList(this, 10); - moveAssists = new HexList(this, 6); - attackAssists = new HexList(this, 6); + possibleMoves = new HexList(this, Hex.MOVE1, 40); + possiblePaths = new HexList(this, Hex.MOVE1, 10); // Hex.MOVE2 + possibleTargets = new HexList(this, Hex.TARGET, 10); + moveAssists = new HexList(this, Hex.ASSIST, 6); + attackAssists = new HexList(this, Hex.ASSIST, 6); } @Override -- cgit v1.2.3