添加暂停蒙层
This commit is contained in:
@@ -23,6 +23,9 @@ export class Stage extends Laya.Script {
|
||||
@property(Laya.Button)
|
||||
public btn_pause: Laya.Button
|
||||
|
||||
@property(Laya.Box)
|
||||
public obj_mask: Laya.Box
|
||||
|
||||
@property(Laya.Label)
|
||||
public label_score: Laya.Label
|
||||
|
||||
@@ -140,6 +143,8 @@ export class Stage extends Laya.Script {
|
||||
this.btn_hint_ad = this.btn_hint.getChildByName("Image").getChildByName("ad") as Laya.Box
|
||||
this.btn_hint_label = this.btn_hint.getChildByName("Image").getChildByName("normal").getChildByName("label") as Laya.Label
|
||||
|
||||
this.obj_mask.visible = false
|
||||
|
||||
EventManager.getInstance().RegisterEvent(EVENT_TYPES.NOT_UPDATE_MISTAKE, Stage.EventUpdateMistake)
|
||||
EventManager.getInstance().RegisterEvent(EVENT_TYPES.NOT_UPDATE_PAUSE, Stage.EventUpdatePause)
|
||||
}
|
||||
@@ -158,6 +163,7 @@ export class Stage extends Laya.Script {
|
||||
public static EventUpdatePause(arg: any): void {
|
||||
if (Stage._instance) {
|
||||
Stage._instance.paused = arg
|
||||
Stage._instance.obj_mask.visible = arg
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user