diff --git a/audio/AvoTheCado Project/ExportTheCado.als b/audio/AvoTheCado Project/ExportTheCado.als index 0983393..0c1dd91 100644 Binary files a/audio/AvoTheCado Project/ExportTheCado.als and b/audio/AvoTheCado Project/ExportTheCado.als differ diff --git a/audio/click.wav b/audio/click.wav index 6d6b914..32dfd47 100644 Binary files a/audio/click.wav and b/audio/click.wav differ diff --git a/audio/poop.wav b/audio/poop.wav new file mode 100644 index 0000000..e57f70c Binary files /dev/null and b/audio/poop.wav differ diff --git a/avocado.py b/avocado.py index 02cf6c6..61b1931 100644 --- a/avocado.py +++ b/avocado.py @@ -31,6 +31,7 @@ class Avocado: # Avocado sounds self.click = self.loadClick() + self.clickFail = self.loadFailClick() def setTargetColor(self, targetColor): @@ -57,14 +58,18 @@ class Avocado: if self.rect.left < mousex and self.rect.right > mousex and \ self.rect.top < mousey and self.rect.bottom > mousey: - self.click.play() - if self.color == self.target: self.has_been_pinned = True self.is_still_falling = False + self.click.play() return True else: + self.clickFail.play() return False + # BUG - isHit is called 4 times upon click which makes it return the + # first time but fail the consecutive times + #else: + # self.clickFail.play() def isFalling(self): @@ -101,5 +106,11 @@ class Avocado: return pygame.mixer.Sound("audio/click.wav") + def loadFailClick(self, sound=True): + if not sound: + return + return pygame.mixer.Sound("audio/poop.wav") + + def destroy(self): del(self) diff --git a/img/splashScreen.png b/img/splashScreen.png index 6f46d9f..b8ccdd1 100644 Binary files a/img/splashScreen.png and b/img/splashScreen.png differ