summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/src/ch/asynk/tankontank/engine/gfx/animations/DiceAnimation.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/gfx/animations/DiceAnimation.java b/core/src/ch/asynk/tankontank/engine/gfx/animations/DiceAnimation.java
index 6610997..56d12ba 100644
--- a/core/src/ch/asynk/tankontank/engine/gfx/animations/DiceAnimation.java
+++ b/core/src/ch/asynk/tankontank/engine/gfx/animations/DiceAnimation.java
@@ -78,10 +78,21 @@ public class DiceAnimation implements Animation, Drawable
return DICE_DIMENSION;
}
+ public void set(float x, float y)
+ {
+ this.x = x;
+ this.y = y;
+ }
+
public void set(int result, float x, float y)
{
this.x = x;
this.y = y;
+ set(result);
+ }
+
+ public void set(int result)
+ {
this.frame = 0;
this.elapsed = 0f;
this.roll = rolls[result - 1];