diff options
Diffstat (limited to 'core/src/ch/asynk/gdx')
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/Tile.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/Tile.java b/core/src/ch/asynk/gdx/boardgame/Tile.java index 36dcf32..077a796 100644 --- a/core/src/ch/asynk/gdx/boardgame/Tile.java +++ b/core/src/ch/asynk/gdx/boardgame/Tile.java @@ -10,25 +10,39 @@ public class Tile implements Drawable { public static TextureAtlas defaultOverlay = null; + public static final Tile OffMap = new Tile(Integer.MIN_VALUE, Integer.MIN_VALUE, 0f, 0f, false); + public int x; public int y; public float cx; public float cy; public boolean blocked; + public boolean onMap; private Overlays overlays; public Tile(int x, int y, float cx, float cy) { + this(x, y, cx, cy, true); + } + + public Tile(int x, int y, float cx, float cy, boolean onMap) + { this.x = x; this.y = y; this.cx = cx; this.cy = cy; + this.onMap = onMap; this.blocked = false; if (defaultOverlay != null) { setOverlay(defaultOverlay); } } + public boolean isOnMap() + { + return onMap; + } + public boolean blockLos(final Tile from, final Tile to) { return false; |