Merge branch 'release/2.4a6'
This commit is contained in:
commit
39b4786acd
14
README.md
14
README.md
|
@ -208,3 +208,17 @@ class MLPlay:
|
||||||
- `passed`:是否通關
|
- `passed`:是否通關
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# 參考資源
|
||||||
|
- 音效
|
||||||
|
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/
|
Binary file not shown.
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"game_name": "swimming-squid",
|
"game_name": "swimming-squid",
|
||||||
"version": "2.4a5",
|
"version": "2.4a6",
|
||||||
"url": "https://github.com/PAIA-Playful-AI-Arena/swimming-squid",
|
"url": "https://github.com/PAIA-Playful-AI-Arena/swimming-squid",
|
||||||
"description": "這是一個魷魚吃東西小遊戲,除了讓你熟習所有基本操作,也是 PAIA 的遊戲教學範例",
|
"description": "這是一個魷魚吃東西小遊戲,除了讓你熟習所有基本操作,也是 PAIA 的遊戲教學範例",
|
||||||
"logo": [
|
"logo": [
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import traceback
|
||||||
|
|
||||||
import pygame
|
import pygame
|
||||||
|
|
||||||
from .env import *
|
from .env import *
|
||||||
|
@ -20,7 +22,7 @@ class SoundController():
|
||||||
def load_sounds(self):
|
def load_sounds(self):
|
||||||
try:
|
try:
|
||||||
pygame.mixer.init()
|
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)
|
pygame.mixer.music.set_volume(0.6)
|
||||||
self._eating_good = pygame.mixer.Sound(path.join(SOUND_PATH, "eat_good_food.mp3"))
|
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._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._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_up = pygame.mixer.Sound(path.join(SOUND_PATH, "lv_up.mp3"))
|
||||||
self._lv_down = pygame.mixer.Sound(path.join(SOUND_PATH, "lv_down.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
|
self._is_sound_on = False
|
||||||
|
traceback.print_exc()
|
||||||
|
|
||||||
@sound_enabled
|
@sound_enabled
|
||||||
def play_music(self):
|
def play_music(self):
|
||||||
|
|
Loading…
Reference in New Issue