summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/rustanddust/engine/Board.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/Board.java b/core/src/ch/asynk/rustanddust/engine/Board.java
index 1e23bb1..36a4926 100644
--- a/core/src/ch/asynk/rustanddust/engine/Board.java
+++ b/core/src/ch/asynk/rustanddust/engine/Board.java
@@ -24,6 +24,7 @@ import ch.asynk.rustanddust.engine.gfx.animations.MoveToAnimation.MoveToAnimatio
public abstract class Board implements Disposable, Animation
{
+ private float block;
private int cols;
private int rows;
private final Tile neighbours[] = new Tile[6];
@@ -70,6 +71,7 @@ public abstract class Board implements Disposable, Animation
protected Board(int cols, int rows)
{
+ this.block = 0f;
// add a frame of OFFMAP Tiles
this.cols = (cols + 2);
this.rows = (rows + 2);
@@ -251,8 +253,18 @@ public abstract class Board implements Disposable, Animation
Gdx.app.debug("Board", " tiles:" + tileCount + " pawns:" + pawnCount + " animations:" + animationCount);
}
+ public void setBlock(float dt)
+ {
+ block = dt;
+ }
+
public boolean animate(float delta)
{
+ if (block > 0f) {
+ block -= delta;
+ if (block > 0f)
+ return true;
+ }
boolean over = (animations.size() > 0);
Iterator<Animation> iter = animations.iterator();
while (iter.hasNext()) {