refactor: 移除未使用的引导和英雄添加方法
清理 SingletonModuleComp 中未实际使用的代码,包括 finishGuide、addHero 和 error 方法,以保持代码简洁并减少维护负担。
This commit is contained in:
@@ -218,11 +218,6 @@ export class SingletonModuleComp extends ecs.Comp {
|
|||||||
isWxClient(): boolean {
|
isWxClient(): boolean {
|
||||||
return gameDataSync.isWxClient();
|
return gameDataSync.isWxClient();
|
||||||
}
|
}
|
||||||
|
|
||||||
finishGuide(index:number){
|
|
||||||
smc.guides[index]=1
|
|
||||||
//存储到远程服务器 后续再添加
|
|
||||||
}
|
|
||||||
|
|
||||||
updateCloudData(){
|
updateCloudData(){
|
||||||
return gameDataSync.updateCloudData();
|
return gameDataSync.updateCloudData();
|
||||||
@@ -279,13 +274,6 @@ export class SingletonModuleComp extends ecs.Comp {
|
|||||||
};
|
};
|
||||||
return data;
|
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){
|
updateGold(gold:number, is_sync: boolean = true){
|
||||||
this.vmdata.gold += gold;
|
this.vmdata.gold += gold;
|
||||||
@@ -295,11 +283,6 @@ export class SingletonModuleComp extends ecs.Comp {
|
|||||||
oops.message.dispatchEvent(GameEvent.GOLD_UPDATE)
|
oops.message.dispatchEvent(GameEvent.GOLD_UPDATE)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
error(){
|
|
||||||
oops.gui.toast("数据处理异常,请重试或重新登录")
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export var smc: SingletonModuleComp = ecs.getSingleton(SingletonModuleComp);
|
export var smc: SingletonModuleComp = ecs.getSingleton(SingletonModuleComp);
|
||||||
|
|||||||
Reference in New Issue
Block a user