diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-04 17:09:50 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-04 17:09:50 +0100 |
commit | 20c0304cb2cfd8b9f1add8d5481a2beb72a5caea (patch) | |
tree | 5b39e040503db95dd0b51bbca1199f52d64ddcb1 /core/src/ch | |
parent | 0dc047a0932c732978579e4cd34850c6f88aac93 (diff) | |
download | RustAndDust-20c0304cb2cfd8b9f1add8d5481a2beb72a5caea.zip RustAndDust-20c0304cb2cfd8b9f1add8d5481a2beb72a5caea.tar.gz |
Hud: no not set the button on after calling set statevim core/src/ch/asynk/tankontank/game/Hud.java
Diffstat (limited to 'core/src/ch')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Hud.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Hud.java b/core/src/ch/asynk/tankontank/game/Hud.java index dcc2f12..a84d361 100644 --- a/core/src/ch/asynk/tankontank/game/Hud.java +++ b/core/src/ch/asynk/tankontank/game/Hud.java @@ -244,7 +244,6 @@ public class Hud implements Disposable public boolean touchUp(float x, float y) { if (btn != null) { - boolean setOn = true; if (actionsBg.hit(x, y)) { if ((btn == moveBtn) && moveBtn.hit(x, y)) ctrl.setState(StateType.MOVE); @@ -260,11 +259,9 @@ public class Hud implements Disposable notify("Action canceled"); ctrl.abort(); } else - setOn = false; + btn.setOff(); } else - setOn = false; - if (setOn) btn.setOn(); - else btn.setOff(); + btn.setOff(); btn = null; } else if (hit != null) { if ((hit == turns) && turns.hit(x, y)) |