From 13515cc317b182149345176b79539e839ac6b634 Mon Sep 17 00:00:00 2001 From: Jarek Lin Date: Fri, 13 Dec 2024 13:45:38 +0800 Subject: [PATCH] feat: add dog bark voice --- apps/pwa/public/dog-bark-voice.mp3 | Bin 0 -> 11077 bytes apps/pwa/src/routes/fomo-game.tsx | 7 +++++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 apps/pwa/public/dog-bark-voice.mp3 diff --git a/apps/pwa/public/dog-bark-voice.mp3 b/apps/pwa/public/dog-bark-voice.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..34b09f793c4bfceb460531441446dfe87e3717d1 GIT binary patch literal 11077 zcmeI2cQhPv)c1GSVzF4VYLvxdl?Z}piMD#L(Gqo)=z@rpwR-QJM2Q{*K@g(%8YLl# z=tLrFh?1CRJ>|c*{QaKue$MWh-^`u4^F6=0bI-jqqlvu%1zqyk#N6DRxTFVxNIdNB zd->Yf``URrf_(f?DA0e~=q_!poy*uu|j(zao z2OAr!5*^bJ_t3EmaFP-gxgjDZDtdX+{{}cW`Jdtcc4_YF=}a`z68}gLNU#$`Mg(>V z)g{!I@LVE$iOwY!mpEVY@RG1gk}t`>ghJu}Ril1YFbEG4Pb`Jz{C2oa*K-4G@2u%DH6IY2tiC_>28o(4x4l*GFVd)|j zZAB3zLE>5_Q?{woO!4%>JrQ{#9QEGzQ!Hbuz=i>T4m8MfjVr7xkeQ8)`YkBr(m%)l z#eX@gwL({&t*s)4*&4!H0567sCdpAGwrPwAF+~lMa84#L90^8>Er|+WA%T!~Oc(b0 z@)O3Hr0*)G4dkCr`>|_agypZ7JKE*aG8d96O27X50rI5t15|qc(!b^Z%0KZ+qCg;p z?qCpN}UUx4jy3qIGwbjnsbjmHa}uCk4;d7OwJf3iTa=bWTJ*uEQ3IC&_HN1 z0BqgUk+)ZYbVXp`1|s562Zstv3u1sAu`4%zd-u&d*hkT*T+v(Z1`UJ-O5A>0G1x2f zC`A2}FTSAR>`B?6w-<5i`SGvL-*Fruf6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sx b/apps/pwa/src/routes/fomo-game.tsx index 9a01110..842d5d1 100644 --- a/apps/pwa/src/routes/fomo-game.tsx +++ b/apps/pwa/src/routes/fomo-game.tsx @@ -87,7 +87,8 @@ export default function FomoGame() { const gravity = 0.9; const bounceVelocity = 15; // Upward velocity during bounce const [isRotating, setIsRotating] = useState(false); - console.log("isShowMint", isShowMint); + const voice = new Audio("/dog-bark-voice.mp3"); + useEffect(() => { let motionListener: any; if (isRunning) { @@ -104,6 +105,7 @@ export default function FomoGame() { velocity.current = bounceVelocity; lastBounceTime.current = currentTime; setScore((prev) => prev + 1); + voice.play(); } }; @@ -163,7 +165,7 @@ export default function FomoGame() { }, [isRunning, timeLeft]); const startGame = () => { - setTimeLeft(5); + setTimeLeft(15); setScore(0); // Reset score setPosition(0); // Reset ball position velocity.current = 0; // Reset velocity @@ -230,6 +232,7 @@ export default function FomoGame() { +