This page should help you: http://pyglet.org/doc/1.1/programming_guide/user_defined_clocks.html
In other words, you can make your own Clock class that knows when the game is paused. When the game is paused, it gives the moment of the pause as the current time. When it is unpaused, it goes back to giving the system time, *minus the total amount of time spent in the paused state.* It's as if that period of time never happened. To rephrase a second time: -Subclass pyglet.clock.Clock (see API docs) -Add fields total_pause_time and pause_start -When unpaused, return system_time_in_millisecs() - total_pause_time -When paused, pause_start = system_time_in_millisecs() return pause_start - total_pause_time -When unpausing from paused state, total_pause_time += system_time_in_millisecs() - pause_start On Jul 17, 2:03 pm, simpsus_science <[EMAIL PROTECTED]> wrote: > Thank you for your answer. > Unfortunately, it does not help (a lot). > You talk of applications that update things. In that case, I could > just define a state and use it. > My application works without any constant updating. It works purely > through scheduling and callbacks. > > For example: > > If I want a sprite to move, I do > > sprite.x = rabbyt.lerp(0, 100, dt = 1) > clock.schedule(lambda dt:sprite.end_move(), 1) > > (Yes, I use rabbyt for the sprites). So, in order to pause, I need the > scheduler to stop counting, and stop the lerp from "lerping". I do not > want to stop drawing, as I want to show menus and stuff. > > Thank you in advance. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
