更换语音

This commit is contained in:
kron
2025-11-14 15:51:45 +08:00
parent 0745c4ba9f
commit 52bccd25fc
3 changed files with 5 additions and 7 deletions

View File

@@ -77,6 +77,8 @@ export const audioFils = {
"https://static.shelingxingqiu.com/attachment/2025-11-12/de6ellf37a2iw6w4pu.mp3", "https://static.shelingxingqiu.com/attachment/2025-11-12/de6ellf37a2iw6w4pu.mp3",
最后30秒: 最后30秒:
"https://static.shelingxingqiu.com/attachment/2025-11-13/de7kzzllq0futwynso.mp3", "https://static.shelingxingqiu.com/attachment/2025-11-13/de7kzzllq0futwynso.mp3",
练习开始:
"https://static.shelingxingqiu.com/attachment/2025-11-14/de88w0lmmt43nnfmoi.mp3",
}; };
// 版本控制日志函数 // 版本控制日志函数

View File

@@ -36,7 +36,7 @@ const onReady = async () => {
currentRound.value = 0; currentRound.value = 0;
scores.value = []; scores.value = [];
start.value = true; start.value = true;
audioManager.play(["请开始射击", "第一轮"]); audioManager.play("练习开始");
}; };
async function onReceiveMessage(messages = []) { async function onReceiveMessage(messages = []) {
@@ -55,10 +55,6 @@ async function onReceiveMessage(messages = []) {
}, 3000); }, 3000);
} }
} }
setTimeout(() => {
if (scores.value.length === 3) audioManager.play("第二轮", false);
if (scores.value.length === 9) audioManager.play("第四轮", false);
}, 200);
} else if (msg.constructor === MESSAGETYPES.ShootSyncMePracticeID) { } else if (msg.constructor === MESSAGETYPES.ShootSyncMePracticeID) {
if (practiseId.value && practiseId.value === msg.practice.id) { if (practiseId.value && practiseId.value === msg.practice.id) {
if (timer.value) { if (timer.value) {
@@ -83,7 +79,7 @@ async function onReceiveMessage(messages = []) {
let count = 60; let count = 60;
wait.value = msg.wait; wait.value = msg.wait;
uni.$emit("update-ramain", count); uni.$emit("update-ramain", count);
if (scores.value.length === 6) audioManager.play("第三轮", false); audioManager.play("练习开始");
if (!timer.value) { if (!timer.value) {
timer.value = setInterval(() => { timer.value = setInterval(() => {
count -= 1; count -= 1;

View File

@@ -31,7 +31,7 @@ const onReady = async () => {
scores.value = []; scores.value = [];
start.value = true; start.value = true;
setTimeout(() => { setTimeout(() => {
uni.$emit("play-sound", "请开始射击"); audioManager.play("练习开始");
}, 300); }, 300);
}; };