java - Timer not resuming after game loosing focus -
i have recurring task. schedule in standard way (timer
libgdx
one: com.badlogic.gdx.utils.timer
):
timer.schedule(mytask, 2, 2);
when user wants pause game, call:
timer.instance().stop();
to pause execution of task. when user resumes game call:
timer.instance().start();
this works well, if user:
- pauses game
- makes game loose focus (e.g, focusing on different window)
resumes game
the task never fired again. ideas how can solved?
update
i've opened issue possible bug in libgdx
: https://github.com/libgdx/libgdx/issues/3181
turns out indeed bug in libgdx. fixed , issue gone (i'm using libgdx
1.6.2-snapshot version).
thanks go great team of libgdx!
Comments
Post a Comment