From e544eecebc2e9055453a5234de3e55007fc10a58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sun, 30 Nov 2014 18:59:25 +0100 Subject: ShotAnimation: set a START_DELAY at 0.8f --- core/src/ch/asynk/tankontank/engine/gfx/animations/ShotAnimation.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/ch/asynk/tankontank/engine/gfx/animations/ShotAnimation.java b/core/src/ch/asynk/tankontank/engine/gfx/animations/ShotAnimation.java index f8673df..4a47805 100644 --- a/core/src/ch/asynk/tankontank/engine/gfx/animations/ShotAnimation.java +++ b/core/src/ch/asynk/tankontank/engine/gfx/animations/ShotAnimation.java @@ -18,6 +18,7 @@ public class ShotAnimation implements Disposable, Animation, Pool.Poolable { private static final float SHOT_SCATTERING = 60f; private static final float TIME_SCATTERING = 0.6f; + private static final float START_DELAY = 0.8f; private static final float SHOT_SPEED = 700f; private static final float EXPLOSION_FRAME_DURATION = 0.05f; @@ -128,7 +129,7 @@ public class ShotAnimation implements Disposable, Animation, Pool.Poolable float w = (float) Math.sqrt((dx * dx) + (dy * dy)); // timing - float delay = (random.nextFloat() * TIME_SCATTERING); + float delay = START_DELAY + (random.nextFloat() * TIME_SCATTERING); float shot_duration = ((random.nextFloat() * TIME_SCATTERING) + (w / SHOT_SPEED)); float explosion_duration = (explosion.cols * EXPLOSION_FRAME_DURATION); -- cgit v1.1-2-g2b99