diff --git a/avocado.py b/avocado.py index e26fce8..3fbe692 100644 --- a/avocado.py +++ b/avocado.py @@ -15,6 +15,7 @@ class Avocado: self.has_been_pinned = False return None + print('New avocado is ' + ','.join(str(color))) self.screen = screen self.color = color self.select = select @@ -81,8 +82,16 @@ class Avocado: def hasLanded(self): if self.rect.bottom > self.screen_height or self.rect.top < 0: self.is_falling = False + print('platch') return True + def mute(self,mute=False): + if mute: + pygame.mixer.music.set_volume(0.0) + else: + pygame.mixer.music.set_volume(0.5) + + def destroy(self): del(self) diff --git a/game.py b/game.py index 95b2660..9867015 100755 --- a/game.py +++ b/game.py @@ -10,6 +10,7 @@ from pygame.locals import * from support.colors import * from interface import hud + def initialize_screen(): displayInfo = pygame.display.Info() zoom = 1.3 @@ -21,6 +22,8 @@ def initialize_screen(): def main(): pygame.init() + pygame.mixer.init() + pygame.mixer.music.set_volume(0.5) pygame.display.set_caption('Pin Avo, the Cado!') clock = pygame.time.Clock() diff --git a/requirements.txt b/requirements.txt index e69de29..7a557c7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -0,0 +1 @@ +hg+https://bitbucket.org/pygame/pygame