From 8682a027ce3ffea3354e4aceb3348426bb55e57e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 11 Dec 2014 10:58:36 +0100 Subject: DiceAnimation: add set(result) and set(x, y) --- .../asynk/tankontank/engine/gfx/animations/DiceAnimation.java | 11 +++++++++++ 1 file changed, 11 insertions(+) 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]; -- cgit v1.1-2-g2b99