[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Pausing a function



Samuel Mankins wrote:
Things that move around randomly, like plants waving in the wind

Make your plants objects that keep an internal counter of
where the're up to in the animation, and have an animate()
method that advances the animation by one step.

Set up a timer that sends you events at regular intervals.
When you get one of these events, call the animate() methods
of all your animated objects.

--
Greg