diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-12-05 14:51:21 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-12-05 14:51:21 +0100 |
commit | f88b3ccb4c89e47b52a03df0e212b5be05f02e34 (patch) | |
tree | a51a2b60bf20fb5470bbdfa0703627cebbea3951 /core/src/ch | |
parent | d44015f377ae7d86535586882cd4a137e6d4e182 (diff) | |
download | RustAndDust-f88b3ccb4c89e47b52a03df0e212b5be05f02e34.zip RustAndDust-f88b3ccb4c89e47b52a03df0e212b5be05f02e34.tar.gz |
InfantryFireAnimation: use completed to hide bullet trace
Diffstat (limited to 'core/src/ch')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/gfx/animations/InfantryFireAnimation.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/gfx/animations/InfantryFireAnimation.java b/core/src/ch/asynk/tankontank/engine/gfx/animations/InfantryFireAnimation.java index 3af4a81..34641cc 100644 --- a/core/src/ch/asynk/tankontank/engine/gfx/animations/InfantryFireAnimation.java +++ b/core/src/ch/asynk/tankontank/engine/gfx/animations/InfantryFireAnimation.java @@ -111,12 +111,13 @@ public class InfantryFireAnimation implements Disposable, Animation, Pool.Poolab return false; } + completed = true; return true; } public void draw(Batch batch) { - if (fired) + if (fired && !completed) batch.draw(fireRegion, fire_x, fire_y, 0, 0, fireRegion.getRegionWidth(), fireRegion.getRegionHeight(), 1f, 1f, fire_a); } } @@ -191,10 +192,8 @@ public class InfantryFireAnimation implements Disposable, Animation, Pool.Poolab @Override public void draw(Batch batch) { - for (Shot shot : shots) { - if (shot.fired) - shot.draw(batch); - } + for (Shot shot : shots) + shot.draw(batch); } @Override |