优化GameComponent代码

This commit is contained in:
dgflash
2024-08-26 13:41:10 +08:00
parent 07c4dc2623
commit 13e1075f54

View File

@@ -370,7 +370,7 @@ export class GameComponent extends Component {
for (const name of args) {
var func = self[name];
if (func)
this.on(name, self[name], this);
this.on(name, func, this);
else
console.error(`名为【${name}】的全局事方法不存在`);
}