Permalink
Browse files

Merge branch 'master' of github.com:andrewsmedina/pyweek2010

  • Loading branch information...
2 parents 9086001 + 6baae75 commit afd05f1bc7d5e04e889509e4b73167f9a2143cf0 @diofeher diofeher committed Aug 26, 2010
View
@@ -37,7 +37,7 @@ def load_sprites(self):
self.add(self.prison)
self.kombi = Sprite('media/imgs/kombi.png')
- self.kombi.position = 700,90
+ self.kombi.position = 790,90
self.add(self.kombi)
@@ -59,10 +59,10 @@ def fall(self):
class Catcher(Layer):
-
+
is_event_handler = True
- MOVEMENT_RATE = 50 # Constant used to move sprite
+ MOVEMENT_RATE = 100 # Constant used to move sprite
def __init__(self, *args, **kwargs):
super(Catcher, self).__init__()
@@ -71,9 +71,9 @@ def __init__(self, *args, **kwargs):
self.add(self.catcher)
def on_key_press(self, key, modifiers):
- if key == pyglet.window.key.LEFT:
+ if key == pyglet.window.key.LEFT and self.catcher.position[0] > 300:
self.catcher.position = self.catcher.position[0] - self.MOVEMENT_RATE, self.catcher.position[1]
- elif key == pyglet.window.key.RIGHT:
+ elif key == pyglet.window.key.RIGHT and self.catcher.position[0] < 500:
self.catcher.position = self.catcher.position[0] + self.MOVEMENT_RATE, self.catcher.position[1]
if __name__ == '__main__':
@@ -58,7 +58,7 @@ def __init__(self):
self.create_menu(items)
- sound.player.queue(pyglet.resource.media('media/sounds/menu.mp3'))
+ sound.player.queue(pyglet.resource.media('media/sounds/fundogame.mp3'))
sound.player.eos_action = 'loop'
sound.player.play()
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit afd05f1

Please sign in to comment.