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

Re: [pygame] Could sprite drawing be done but a Sprite.draw function?



On 25.07.2011 11:13, Mac Ryan wrote:
Hi and thank you for your answer.

	I think I failed to explain myself properly. What I meant with
my question is that I have been surprised that the drawing of sprites
happens **calling surface.blit(sprite.image, sprite.rect)** instead than
**calling sprite.draw()**. It makes of course sense that drawing is
co-ordinated by the group, but the way it's done now make very hard to
"customise" the drawing: I might need for example to selectively choose
a flag for the blit operation on_some_  of the sprites, for example...

	Hope this clarify what's my doubt better!:)

	Mac

Hi

You could use a DirtySprite (this sprite has attributes for all the blit arguments) with the corresponding group(s):

http://www.pygame.org/docs/ref/sprite.html#pygame.sprite.DirtySprite


~DR0ID