diff options
author | Walter Bender <walter.bender@gmail.com> | 2011-10-05 00:55:57 (GMT) |
---|---|---|
committer | Walter Bender <walter.bender@gmail.com> | 2011-10-05 00:55:57 (GMT) |
commit | 0480bcf8b1ea03dd56080468b3282f199158bc3b (patch) | |
tree | 1a29f9bd86b38a0bd7577399a584d75296d50782 /bounce.py | |
parent | da779c5201a465f1e37196ba0ce327300a144abd (diff) |
code cleanup
Diffstat (limited to 'bounce.py')
-rw-r--r-- | bounce.py | 28 |
1 files changed, 4 insertions, 24 deletions
@@ -177,30 +177,10 @@ class Bounce(): self.ball.set_label_attributes(24) self.cells = [] # Easter Egg animation - self.cells.append(Sprite(self.sprites, 0, 0, - _svg_str_to_pixbuf(svg_from_file( - os.path.join(path, 'basketball1.svg'))))) - self.cells.append(Sprite(self.sprites, 0, 0, - _svg_str_to_pixbuf(svg_from_file( - os.path.join(path, 'basketball2.svg'))))) - self.cells.append(Sprite(self.sprites, 0, 0, - _svg_str_to_pixbuf(svg_from_file( - os.path.join(path, 'basketball2a.svg'))))) - self.cells.append(Sprite(self.sprites, 0, 0, - _svg_str_to_pixbuf(svg_from_file( - os.path.join(path, 'basketball3.svg'))))) - self.cells.append(Sprite(self.sprites, 0, 0, - _svg_str_to_pixbuf(svg_from_file( - os.path.join(path, 'basketball3a.svg'))))) - self.cells.append(Sprite(self.sprites, 0, 0, - _svg_str_to_pixbuf(svg_from_file( - os.path.join(path, 'basketball4.svg'))))) - self.cells.append(Sprite(self.sprites, 0, 0, - _svg_str_to_pixbuf(svg_from_file( - os.path.join(path, 'basketball4a.svg'))))) - self.cells.append(Sprite(self.sprites, 0, 0, - _svg_str_to_pixbuf(svg_from_file( - os.path.join(path, 'basketball5.svg'))))) + for i in range(8): + self.cells.append(Sprite( + self.sprites, 0, 0, _svg_str_to_pixbuf(svg_from_file( + os.path.join(path, 'basketball%d.svg' % (i + 1)))))) for spr in self.cells: spr.set_layer(1) spr.move((0, self.height)) # move animation cells off screen |