Coding Style solved
@@ -56,6 +56,8 @@ public float getVertScale() {
private float scale;
+ private static float PAUSED_ANIMATION_FRAME_TICK_TIME = 0.035f;
+
/**
* Creates default animations
* @param duration the duration of the animation in seconds
@@ -181,9 +183,10 @@ public void update(float delta) {
// avoid skipping over fast animations on heavy load
animDelta = 0.1f;
}
- if(animDelta == 0.0f) {
- // in case time is paused
- animDelta = 0.035f;
+ if (animDelta < 0.0001f) {
+ // when we are inGameState and get to pauseMenu the time is paused
+ // so we need to fake the time is still running at a set rate
+ animDelta = PAUSED_ANIMATION_FRAME_TICK_TIME;
}
flyIn.update(animDelta);
