refactor(组件): 添加组件销毁时的资源清理逻辑并移除无用文件

在TopComp、move和HeroAnmComp组件中添加onDestroy方法,用于清理事件监听
移除已不再使用的MInfoComp组件及其meta文件
This commit is contained in:
walkpan
2026-01-04 22:24:54 +08:00
parent 66ab6bc2cd
commit 9ab8ccdb92
5 changed files with 16 additions and 36 deletions

View File

@@ -20,6 +20,10 @@ export class topComp extends Component {
.start()
}
onDestroy(){
oops.message.off(GameEvent.GOLD_UPDATE,this.onGoldUpdate,this);
}
update(deltaTime: number) {