Thanks for the advice.
Do you have a code example of how to implement this?

вс, 9 апр. 2023 г. в 02:11, 'Greg Ewing' via pyglet-users
<pyglet-users@googlegroups.com>:
>
> On 8/04/23 12:26 am, Matan wrote:
> > Of course I could keep all animations pushed as `update` and ` draw`
> > event handlers go idle by conditional logic, but this will leave zombie
> > event handlers lying around, making it inappropriate to design each
> > animation as a unit of execution on loop events.
> >
> > How would you design for making shape animations which have arbitrary
> > start and end times relative to each other, meaning that their start and
> > end times are not serial to the start and end time of other animations?
>
> Create an object with an uopdate() method to manage each animation
> and keep a list or other collection of active animation objects.
> Then you can have just one event handler permanently installed that
> calls the update() method of all active animations. That way you
> can stop an animation at any time just by removing its object
> from the active list.
>
> --
> Greg
> This email may be confidential and subject to legal privilege, it may not 
> reflect the views of the University of Canterbury, and it is not guaranteed 
> to be virus free. If you are not an intended recipient, please notify the 
> sender immediately and erase all copies of the message and any attachments.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "pyglet-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to pyglet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pyglet-users/80cfcab9-c2ce-7198-2ac9-d2aa0e91f6e1%40canterbury.ac.nz.

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyglet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyglet-users/CAOPWAhaqLaHpnCyEV7P1MRzhdLighnK2GT%2BVF2DCtdSCjo421Q%40mail.gmail.com.

Reply via email to