Add VIP presence themes and custom greetings
This commit is contained in:
@@ -10,6 +10,8 @@ const EffectManager = (() => {
|
||||
let _current = null;
|
||||
// 全屏 Canvas 元素引用
|
||||
let _canvas = null;
|
||||
// 待播放特效队列,避免多个进场效果互相打断
|
||||
const _queue = [];
|
||||
|
||||
/**
|
||||
* 获取或创建全屏 Canvas 元素
|
||||
@@ -50,6 +52,13 @@ const EffectManager = (() => {
|
||||
if (typeof EffectSounds !== "undefined") {
|
||||
EffectSounds.stop();
|
||||
}
|
||||
|
||||
if (_queue.length > 0) {
|
||||
const nextType = _queue.shift();
|
||||
if (nextType) {
|
||||
play(nextType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -60,9 +69,8 @@ const EffectManager = (() => {
|
||||
function play(type) {
|
||||
// 防重入:同时只允许一个特效
|
||||
if (_current) {
|
||||
console.log(
|
||||
`[EffectManager] 特效 ${_current} 正在播放,忽略 ${type}`,
|
||||
);
|
||||
console.log(`[EffectManager] 特效 ${_current} 正在播放,加入队列 ${type}`);
|
||||
_queue.push(type);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user