[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] simple question about creating multiple instances of a sprite
Thanks, that makes sense now that I know what xrange
and range are.
Devon
--- Greg Ewing <greg.ewing@xxxxxxxxxxxxxxxx> wrote:
> Devon Scott-Tunkin wrote:
> > Please forgive my programming ignorance, but is
> there
> > a simpler way to create multiple instances of a
> sprite
> > than say:
> >
> > sprite(), sprite(), sprite(), sprite(), sprite()?
>
> for i in xrange(5):
> sprite()
>
> Although you may want to store references to the
> created
> sprites somewhere, if your sprite() function doesn't
> do that itself.
>
> --
> Greg
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com