diff --git a/asset/music/bgm.wav b/asset/music/bgm.wav index 85fbd6c..f65ea6f 100644 Binary files a/asset/music/bgm.wav and b/asset/music/bgm.wav differ diff --git a/asset/sounds/eat_bad_food.mp3 b/asset/sounds/eat_bad_food.mp3 new file mode 100644 index 0000000..00682a0 Binary files /dev/null and b/asset/sounds/eat_bad_food.mp3 differ diff --git a/asset/sounds/eat_good_food.mp3 b/asset/sounds/eat_good_food.mp3 new file mode 100644 index 0000000..b72f2a0 Binary files /dev/null and b/asset/sounds/eat_good_food.mp3 differ diff --git a/asset/sounds/fail.mp3 b/asset/sounds/fail.mp3 new file mode 100644 index 0000000..88fd93b Binary files /dev/null and b/asset/sounds/fail.mp3 differ diff --git a/asset/sounds/lv_down.mp3 b/asset/sounds/lv_down.mp3 new file mode 100644 index 0000000..5c0ae6b Binary files /dev/null and b/asset/sounds/lv_down.mp3 differ diff --git a/asset/sounds/lv_up.mp3 b/asset/sounds/lv_up.mp3 new file mode 100644 index 0000000..6b8d1ea Binary files /dev/null and b/asset/sounds/lv_up.mp3 differ diff --git a/asset/sounds/pass.mp3 b/asset/sounds/pass.mp3 new file mode 100644 index 0000000..9d814a7 Binary files /dev/null and b/asset/sounds/pass.mp3 differ diff --git a/src/game.py b/src/game.py index 69dbba3..91561a8 100644 --- a/src/game.py +++ b/src/game.py @@ -185,7 +185,8 @@ class EasyGame(PaiaGame): if self.is_passed: self._level += 1 self.sound_controller.play_cheer() - + else: + self.sound_controller.play_fail() self._init_game() diff --git a/src/sound_controller.py b/src/sound_controller.py index f755ed3..4bdc1a6 100644 --- a/src/sound_controller.py +++ b/src/sound_controller.py @@ -22,11 +22,12 @@ class SoundController(): pygame.mixer.init() pygame.mixer.music.load(path.join(MUSIC_PATH, "bgm.wav")) pygame.mixer.music.set_volume(0.6) - self._eating_good = pygame.mixer.Sound(path.join(SOUND_PATH, "Coin.wav")) - self._eating_bad = pygame.mixer.Sound(path.join(SOUND_PATH, "Low Boing.wav")) - self._cheer = pygame.mixer.Sound(path.join(SOUND_PATH, "Cheer.wav")) - self._lv_up = pygame.mixer.Sound(path.join(SOUND_PATH, "lv_up.wav")) - self._lv_down = pygame.mixer.Sound(path.join(SOUND_PATH, "lv_down.wav")) + self._eating_good = pygame.mixer.Sound(path.join(SOUND_PATH, "eat_good_food.mp3")) + self._eating_bad = pygame.mixer.Sound(path.join(SOUND_PATH, "eat_bad_food.mp3")) + self._pass = pygame.mixer.Sound(path.join(SOUND_PATH, "pass.mp3")) + self._fail = pygame.mixer.Sound(path.join(SOUND_PATH, "fail.mp3")) + self._lv_up = pygame.mixer.Sound(path.join(SOUND_PATH, "lv_up.mp3")) + self._lv_down = pygame.mixer.Sound(path.join(SOUND_PATH, "lv_down.mp3")) except Exception: self._is_sound_on = False @@ -43,9 +44,12 @@ class SoundController(): self._eating_bad.play() @sound_enabled def play_cheer(self): - self._cheer.play() + self._pass.play() @sound_enabled + def play_fail(self): + self._fail.play() + @sound_enabled def play_lv_up(self): self._lv_up.play()