diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-01 20:51:19 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-01 20:51:19 +0200 |
commit | 33f543ab0cfdd39d8e3bbd659c701ab88a89872b (patch) | |
tree | 0397cb7673596d43fa9ee087db35193958bc328d | |
parent | f7eaa153a9a5f4a42477b4e59a354924530d4a63 (diff) | |
download | RustAndDust-33f543ab0cfdd39d8e3bbd659c701ab88a89872b.zip RustAndDust-33f543ab0cfdd39d8e3bbd659c701ab88a89872b.tar.gz |
Board -> Tile -> StackedImages: isEnabled(int i) overlays
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Board.java | 5 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Tile.java | 5 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java index 62e03f2..36df6bd 100644 --- a/core/src/ch/asynk/tankontank/engine/Board.java +++ b/core/src/ch/asynk/tankontank/engine/Board.java @@ -384,6 +384,11 @@ public abstract class Board implements Disposable disableOverlaysOn(getTile(col, row)); } + public boolean isOverlayEnabledOn(int col, int row, int i) + { + return getTile(col, row).isOverlayEnabled(i); + } + public void disableOverlaysOn(Tile tile) { if (tile.disableOverlays()) diff --git a/core/src/ch/asynk/tankontank/engine/Tile.java b/core/src/ch/asynk/tankontank/engine/Tile.java index f82c414..7e41a17 100644 --- a/core/src/ch/asynk/tankontank/engine/Tile.java +++ b/core/src/ch/asynk/tankontank/engine/Tile.java @@ -95,6 +95,11 @@ public abstract class Tile implements Drawable return overlays.isEnabled(); } + public boolean isOverlayEnabled(int i) + { + return overlays.isEnabled(i); + } + public boolean enableOverlay(int i, boolean enable) { overlays.enable(i, enable); diff --git a/core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java b/core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java index d1d2dbf..48f7daa 100644 --- a/core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java +++ b/core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java @@ -35,6 +35,11 @@ public class StackedImages implements Moveable return false; } + public boolean isEnabled(int i) + { + return enabled[i]; + } + @Override public float getX() { |