summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-30 18:59:25 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-30 18:59:25 +0100
commite544eecebc2e9055453a5234de3e55007fc10a58 (patch)
treeb156a3b3febd765fbab20f8d829505a026c64faf /core/src/ch/asynk
parentad4495f907d33f72db66401886b4800471822de5 (diff)
downloadRustAndDust-e544eecebc2e9055453a5234de3e55007fc10a58.zip
RustAndDust-e544eecebc2e9055453a5234de3e55007fc10a58.tar.gz
ShotAnimation: set a START_DELAY at 0.8f
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/tankontank/engine/gfx/animations/ShotAnimation.java3
1 files changed, 2 insertions, 1 deletions
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);