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

Re: [pygame] Newbie needs help, what's the most efficient (or easiest) way to do this?



Ah, I get it. I remember there being a section in a pygame tutorial I
read having this in it, but if I put them in another sprite class, how
is it going to get the number of combos from the textsprite class to
blit on screen?

On 1/29/07, Patrick Mullen <saluk64007@xxxxxxxxx> wrote:
Ok, first I thought you weren't blitting the other text to the screen at
all, now I see that you are, but you are doing it inside another sprites
update() method.  The problem is that when you do

dirty = all.draw (screen)

It is only getting dirty rectangles for each sprite that is in all.  So it
is only updating the rectangle belonging to the textsprite.image.  The other
text displays should be individual sprites according to this architecture,
or you could have an overlay sprite that blits them to a larger .image.

Hope that helps you figure it out, although my description isn't so good.