模板工程升级修改

This commit is contained in:
2026-08-11 22:17:54 +08:00
parent 047561675b
commit 3b7c103387
38 changed files with 16607 additions and 1205 deletions
@@ -810,7 +810,7 @@ var AnimationManager = AnimationManager || {};
}
_initialized = true;
console.log('[AnimationManager] Initialized (v2.0.0 optimized)');
// console.log('[AnimationManager] Initialized (v2.0.0 optimized)');
};
/**
@@ -164,7 +164,7 @@ var AudioManager = AudioManager || {};
return;
}
_initialized = true;
console.log('[AudioManager] Initialized (v4.0.0)');
// console.log('[AudioManager] Initialized (v4.0.0)');
};
// ============================================================================
@@ -80,7 +80,7 @@ var EventBus = {
};
this._listeners[eventName].push(listener);
console.log('✅ EventBus: 订阅事件', eventName);
// console.log('✅ EventBus: 订阅事件', eventName);
// 返回取消订阅函数
var self = this;
@@ -121,7 +121,7 @@ var EventBus = {
// 如果没有指定callback,取消该事件的所有监听器
if (!callback) {
delete this._listeners[eventName];
console.log('✅ EventBus: 取消所有', eventName, '监听器');
// console.log('✅ EventBus: 取消所有', eventName, '监听器');
return true;
}
@@ -130,7 +130,7 @@ var EventBus = {
for (var i = listeners.length - 1; i >= 0; i--) {
if (listeners[i].callback === callback) {
listeners.splice(i, 1);
console.log('✅ EventBus: 取消', eventName, '监听器');
// console.log('✅ EventBus: 取消', eventName, '监听器');
return true;
}
}
@@ -152,7 +152,7 @@ var EventBus = {
var listeners = this._listeners[eventName].slice(); // 复制数组,避免迭代中修改
var count = 0;
console.log('📡 EventBus: 触发事件', eventName, data);
// console.log('📡 EventBus: 触发事件', eventName, data);
for (var i = 0; i < listeners.length; i++) {
try {
@@ -204,7 +204,7 @@ var EventBus = {
*/
clear: function() {
this._listeners = {};
console.log('✅ EventBus: 已清空所有监听器');
// console.log('✅ EventBus: 已清空所有监听器');
},
/**
@@ -214,7 +214,7 @@ var EventBus = {
clearEvent: function(eventName) {
if (this._listeners[eventName]) {
delete this._listeners[eventName];
console.log('✅ EventBus: 已清空', eventName, '的所有监听器');
// console.log('✅ EventBus: 已清空', eventName, '的所有监听器');
}
}
};