[quote]Well yes, you could do that. In fact that’s basically what GAGETimer does internally. It’s just as easy (any probably a bit cleaner) to just use another instance of the timer. All instances are working off the same timing source, but the individual instances are dealing with the naggling details for you. 
[/quote]
Yes it’s a good solution…
But you can generate Events and make entity classes receive them simply implementing a EventListener interface…
In my case tasks have a name string so it’s simple to create em and receive their messages.
For example in CastleTrouble I have used many of this simultaneous tasks:
- “Hurry up!” (only in beta) after 60 secs it alters the enemies’ speed.
- Intro delays and events…
- One cyclic to make a hourGlass run (only in beta)
- Delay before opening doors
and many others…
Another great pro of this method is that other “sources” can generate events, my library can generate events:
- When a sprite change a frame during an animation
- At the end of an animation (this is really useful to concatenate animations or to use animations as precalculated delays)
- At the end of a MOD or a MIDI
and so on…
So having a Task based timer is a great thing expecially if you have (or want) also an Event driven system.