diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-12-29 08:02:25 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-12-29 08:02:25 +0100 |
commit | f9ced3fff597baf93b46db4e1068d923e308b0e3 (patch) | |
tree | 5767fc743d3fc51d8bf6b3fc40ec15cf60c0a65e /core/src/ch | |
parent | 12087bcff803b874178767a7ca2e2803314ee99a (diff) | |
download | RustAndDust-f9ced3fff597baf93b46db4e1068d923e308b0e3.zip RustAndDust-f9ced3fff597baf93b46db4e1068d923e308b0e3.tar.gz |
TankFireAnimation: reduce shot delay, compute fixed fire duration
Diffstat (limited to 'core/src/ch')
-rw-r--r-- | core/src/ch/asynk/rustanddust/engine/gfx/animations/TankFireAnimation.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/gfx/animations/TankFireAnimation.java b/core/src/ch/asynk/rustanddust/engine/gfx/animations/TankFireAnimation.java index e805f15..8584a79 100644 --- a/core/src/ch/asynk/rustanddust/engine/gfx/animations/TankFireAnimation.java +++ b/core/src/ch/asynk/rustanddust/engine/gfx/animations/TankFireAnimation.java @@ -16,8 +16,8 @@ public class TankFireAnimation implements Disposable, Animation, Pool.Poolable private static final float HALF_WIDTH_P = 0.9f; private static final float SHOT_SCATTERING = 20f; private static final float TIME_SCATTERING = 0.6f; - private static final float START_DELAY = 0.8f; - private static final float SHOT_SPEED = 900f; + private static final float START_DELAY = 0.1f; + private static final float SHOT_SPEED = 800f; private static final float AIM_SPEED = 90f; private static final float EXPLOSION_FRAME_DURATION = 0.07f; @@ -96,7 +96,7 @@ public class TankFireAnimation implements Disposable, Animation, Pool.Poolable // timing float delay = START_DELAY + (FireAnimation.random.nextFloat() * TIME_SCATTERING); - float fire_duration = ((FireAnimation.random.nextFloat() * TIME_SCATTERING) + (w / SHOT_SPEED)); + float fire_duration = (w / SHOT_SPEED); float explosion_duration = (FireAnimation.explosion.cols * EXPLOSION_FRAME_DURATION); this.elapsed = 0f; |