优化座驾特效入场标题

This commit is contained in:
pllx
2026-04-30 10:29:11 +08:00
parent 18acd7d890
commit 221f629ec2
12 changed files with 91 additions and 41 deletions
+6 -1
View File
@@ -482,10 +482,15 @@ export function bindChatEvents() {
const target = e.detail?.target_username;
const operator = e.detail?.operator;
const myName = window.chatContext?.username;
const effectOptions = {
effect_title: e.detail?.effect_title,
ride_name: e.detail?.ride_name,
operator,
};
if (type && typeof EffectManager !== "undefined") {
if (!target || target === myName || operator === myName) {
EffectManager.play(type);
EffectManager.play(type, effectOptions);
}
}
});
+1 -1
View File
@@ -81,7 +81,7 @@ function playEntryEffect(initialState) {
}
window.setTimeout(() => {
window.EffectManager?.play?.(initialState.entryEffect);
window.EffectManager?.play?.(initialState.entryEffect, initialState.entryEffectOptions || {});
}, 1000);
}