diff --git a/README.md b/README.md index e27c639..33bcd59 100644 --- a/README.md +++ b/README.md @@ -207,4 +207,18 @@ class MLPlay: - `rank`:排名 - `passed`:是否通關 ---- \ No newline at end of file +--- + +# 參考資源 +- 音效 + 1. https://soundeffect-lab.info/sound/anime/ +- 背景音樂 + 1. https://www.motionelements.com/zh-hant/stock-music-28190007-bossa-nova-short-loop +- 圖片 + 1. 魷魚 https://illustcenter.com/2022/07/03/rdesign_1659/ + 2. 湯匙 https://illustcenter.com/2021/11/24/rdesign_6275/ + 3. 薯條 https://illustcenter.com/2021/11/16/rdesign_5098/ + 4. 空罐 https://illustcenter.com/2021/11/19/rdesign_5772/ + 5. 魚1 https://illustcenter.com/2021/12/22/rdesign_8914/ + 6. 魚2 https://illustcenter.com/2021/10/28/rdesign_3149/ + 7. 蝦子 https://illustcenter.com/2021/10/28/rdesign_3157/ \ No newline at end of file diff --git a/asset/music/bgm.mp3 b/asset/music/bgm.mp3 new file mode 100644 index 0000000..856c91a Binary files /dev/null and b/asset/music/bgm.mp3 differ diff --git a/asset/music/bgm.wav b/asset/music/bgm.wav deleted file mode 100644 index f65ea6f..0000000 Binary files a/asset/music/bgm.wav and /dev/null differ diff --git a/game_config.json b/game_config.json index 2c8e26f..d0586ac 100644 --- a/game_config.json +++ b/game_config.json @@ -1,6 +1,6 @@ { "game_name": "swimming-squid", - "version": "2.4a5", + "version": "2.4a6", "url": "https://github.com/PAIA-Playful-AI-Arena/swimming-squid", "description": "這是一個魷魚吃東西小遊戲,除了讓你熟習所有基本操作,也是 PAIA 的遊戲教學範例", "logo": [ diff --git a/src/sound_controller.py b/src/sound_controller.py index 4bdc1a6..e86d85e 100644 --- a/src/sound_controller.py +++ b/src/sound_controller.py @@ -1,3 +1,5 @@ +import traceback + import pygame from .env import * @@ -20,7 +22,7 @@ class SoundController(): def load_sounds(self): try: pygame.mixer.init() - pygame.mixer.music.load(path.join(MUSIC_PATH, "bgm.wav")) + pygame.mixer.music.load(path.join(MUSIC_PATH, "bgm.mp3")) pygame.mixer.music.set_volume(0.6) 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")) @@ -28,8 +30,9 @@ class SoundController(): 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: + except Exception as e : self._is_sound_on = False + traceback.print_exc() @sound_enabled def play_music(self):