refactor(游戏逻辑): 拆分游戏暂停和播放状态的检查条件
将多处 `if(!smc.mission.play || smc.mission.pause)` 条件判断拆分为独立的if语句 在VictoryComp中正确设置pause状态 移除MissionComp中多余的pause状态重置
This commit is contained in:
@@ -51,7 +51,7 @@ export class VictoryComp extends CCComp {
|
||||
|
||||
this.node.getChildByName("btns").getChildByName("next").active=!args.can_revive
|
||||
this.node.getChildByName("btns").getChildByName("alive").active=args.can_revive
|
||||
|
||||
smc.mission.pause=true
|
||||
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ export class VictoryComp extends CCComp {
|
||||
oops.gui.removeByNode(this.node)
|
||||
}
|
||||
clear_data(){
|
||||
|
||||
smc.mission.pause=false
|
||||
}
|
||||
//看广告双倍
|
||||
watch_ad(){
|
||||
|
||||
Reference in New Issue
Block a user