class RenderUpdatesDraw(RenderClear):
"""call sprite.draw(screen) to render sprites"""
def draw(self, surface):
dirty = self.lostsprites
self.lostsprites = []
for s, r in self.spritedict.items():
newrect = s.draw(screen) #Here's the big change
if r is 0:
dirty.append(newrect)
else:
dirty.append(newrect.union(r))
self.spritedict[s] = newrect
return dirty
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter