summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-12-29 08:02:25 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-12-29 08:02:25 +0100
commitf9ced3fff597baf93b46db4e1068d923e308b0e3 (patch)
tree5767fc743d3fc51d8bf6b3fc40ec15cf60c0a65e
parent12087bcff803b874178767a7ca2e2803314ee99a (diff)
downloadRustAndDust-f9ced3fff597baf93b46db4e1068d923e308b0e3.zip
RustAndDust-f9ced3fff597baf93b46db4e1068d923e308b0e3.tar.gz
TankFireAnimation: reduce shot delay, compute fixed fire duration
-rw-r--r--core/src/ch/asynk/rustanddust/engine/gfx/animations/TankFireAnimation.java6
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;