diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-12-11 10:58:36 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-12-11 10:58:36 +0100 |
commit | 8682a027ce3ffea3354e4aceb3348426bb55e57e (patch) | |
tree | 2b0876784e842a8e6d86775af103a7b295ebcc51 /core | |
parent | 414e2be4c6686c6fbfc3c4eff082d817dbcf713c (diff) | |
download | RustAndDust-8682a027ce3ffea3354e4aceb3348426bb55e57e.zip RustAndDust-8682a027ce3ffea3354e4aceb3348426bb55e57e.tar.gz |
DiceAnimation: add set(result) and set(x, y)
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/gfx/animations/DiceAnimation.java | 11 |
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]; |