完成新的个人练习流程调试

This commit is contained in:
kron
2026-02-07 18:30:16 +08:00
parent d35ff9335f
commit d9a2e53faf
8 changed files with 170 additions and 114 deletions

View File

@@ -128,14 +128,17 @@ async function onReceiveMessage(msg) {
} else if (msg.type === MESSAGETYPESV2.BattleEnd) {
audioManager.play("比赛结束");
} else if (msg.type === MESSAGETYPESV2.ShootResult) {
if (msg.shootData.playerId !== user.value.id) return;
if (msg.shootData) {
let key = [];
key.push(msg.shootData.ring ? `${msg.shootData.ring}` : "未上靶");
if (!msg.shootData.ring)
key.push(`${getDirectionText(msg.shootData.angle)}调整`);
audioManager.play(key, false);
let arrow = {};
if (msg.details && Array.isArray(msg.details)) {
arrow = msg.details[msg.details.length - 1];
} else {
if (msg.shootData.playerId !== user.value.id) return;
if (msg.shootData) arrow = msg.shootData;
}
let key = [];
key.push(arrow.ring ? `${arrow.ring}` : "未上靶");
if (!arrow.ring) key.push(`${getDirectionText(arrow.angle)}调整`);
audioManager.play(key, false);
} else if (msg.type === MESSAGETYPESV2.HalfRest) {
halfTime.value = true;
audioManager.play("中场休息");