refactor: 移除未使用的引导和英雄添加方法

清理 SingletonModuleComp 中未实际使用的代码,包括 finishGuide、addHero 和 error 方法,以保持代码简洁并减少维护负担。
This commit is contained in:
panw
2026-04-28 16:20:11 +08:00
parent 9baddd5462
commit c078c929ce
2 changed files with 0 additions and 17 deletions

View File

@@ -218,11 +218,6 @@ export class SingletonModuleComp extends ecs.Comp {
isWxClient(): boolean {
return gameDataSync.isWxClient();
}
finishGuide(index:number){
smc.guides[index]=1
//存储到远程服务器 后续再添加
}
updateCloudData(){
return gameDataSync.updateCloudData();
@@ -279,13 +274,6 @@ export class SingletonModuleComp extends ecs.Comp {
};
return data;
}
addHero(hero_uuid:number){
if(this.heros.indexOf(hero_uuid)==-1){
this.heros.push(hero_uuid)
gameDataSync.markDataDirty();
}
return true
}
updateGold(gold:number, is_sync: boolean = true){
this.vmdata.gold += gold;
@@ -295,11 +283,6 @@ export class SingletonModuleComp extends ecs.Comp {
oops.message.dispatchEvent(GameEvent.GOLD_UPDATE)
return true
}
error(){
oops.gui.toast("数据处理异常,请重试或重新登录")
}
}
export var smc: SingletonModuleComp = ecs.getSingleton(SingletonModuleComp);

File diff suppressed because it is too large Load Diff