From 33f543ab0cfdd39d8e3bbd659c701ab88a89872b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 1 Oct 2014 20:51:19 +0200 Subject: Board -> Tile -> StackedImages: isEnabled(int i) overlays --- core/src/ch/asynk/tankontank/engine/Board.java | 5 +++++ core/src/ch/asynk/tankontank/engine/Tile.java | 5 +++++ core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java | 5 +++++ 3 files changed, 15 insertions(+) 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() { -- cgit v1.1-2-g2b99