From 2b2e8271f44ae6e548f9e8b9844199fa179368f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sat, 27 Sep 2014 22:25:13 +0200 Subject: overlays clear -> disable --- core/src/ch/asynk/tankontank/engine/Board.java | 8 ++++---- core/src/ch/asynk/tankontank/engine/Tile.java | 4 ++-- core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java | 2 +- core/src/ch/asynk/tankontank/game/Map.java | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java index 6616b0b..4a4aa3e 100644 --- a/core/src/ch/asynk/tankontank/engine/Board.java +++ b/core/src/ch/asynk/tankontank/engine/Board.java @@ -327,14 +327,14 @@ public abstract class Board extends Image implements Disposable return areaPoints; } - public void clearOverlaysOn(int col, int row) + public void disableOverlaysOn(int col, int row) { - clearOverlaysOn(getTile(col, row)); + disableOverlaysOn(getTile(col, row)); } - public void clearOverlaysOn(Tile tile) + public void disableOverlaysOn(Tile tile) { - if (tile.clearOverlays()) + if (tile.disableOverlays()) tilesToDraw.add(tile); else tilesToDraw.remove(tile); diff --git a/core/src/ch/asynk/tankontank/engine/Tile.java b/core/src/ch/asynk/tankontank/engine/Tile.java index 7998827..8e3ec93 100644 --- a/core/src/ch/asynk/tankontank/engine/Tile.java +++ b/core/src/ch/asynk/tankontank/engine/Tile.java @@ -58,9 +58,9 @@ public abstract class Tile implements BasicDrawable return (stack.size() != 0); } - public boolean clearOverlays() + public boolean disableOverlays() { - overlays.clear(); + overlays.disableAll(); return occupied(); } diff --git a/core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java b/core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java index 528786e..077dcef 100644 --- a/core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java +++ b/core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java @@ -17,7 +17,7 @@ public class StackedImages implements BasicDrawable this.enabled = new boolean[sprites.size]; } - public void clear() + public void disableAll() { for (int i = 0; i < sprites.size; i++) enabled[i] = false; diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java index 55d51c0..a374e7e 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -102,7 +102,7 @@ public abstract class Map extends Board for (int j = 0; j < cfg.rows; j++) { for (int i = 0; i < cfg.cols; i++) { Hex hex = getHex(i,j); - clearOverlaysOn(i, j); + disableOverlaysOn(i, j); if (hexOn) { if (roadsOn) { if (hex.roads != 0) -- cgit v1.1-2-g2b99