Пример #1
0
 def update(self):
     # The surface needs to be ready-to-draw after update is called
     # Returns true if surface has been modified.
     modified = self.update_children()
     self_changed = False
     if modified or self_changed:
         self.surface.fill(graphics.random_color())
         for child in self.children:
             child.draw_to(self.surface)
     return modified
Пример #2
0
 def random_outline(self):
     pygame.draw.rect(
         self.surface, graphics.random_color(), self.surface.get_rect(), 2)