添加暂停蒙层
This commit is contained in:
@@ -21,6 +21,9 @@
|
||||
"btn_pause": {
|
||||
"_$ref": "qfuij2yw"
|
||||
},
|
||||
"obj_mask": {
|
||||
"_$ref": "n15hk529"
|
||||
},
|
||||
"label_score": {
|
||||
"_$ref": "zgzyqyoc"
|
||||
},
|
||||
@@ -45639,6 +45642,37 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"_$id": "n15hk529",
|
||||
"_$type": "Box",
|
||||
"name": "mask",
|
||||
"width": 1080,
|
||||
"height": 1920,
|
||||
"centerX": 0,
|
||||
"centerY": 0,
|
||||
"_$child": [
|
||||
{
|
||||
"_$id": "8214n7z0",
|
||||
"_$type": "Sprite",
|
||||
"name": "Sprite",
|
||||
"width": 1080,
|
||||
"height": 1920,
|
||||
"alpha": 0.8,
|
||||
"_gcmds": [
|
||||
{
|
||||
"_$type": "DrawRectCmd",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1,
|
||||
"percent": true,
|
||||
"lineWidth": 1,
|
||||
"fillColor": "rgba(245, 247, 251, 1)"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -23,6 +23,9 @@
|
||||
"btn_pause": {
|
||||
"_$ref": "a584gnqk"
|
||||
},
|
||||
"obj_mask": {
|
||||
"_$ref": "9y0dq6th"
|
||||
},
|
||||
"label_score": {
|
||||
"_$ref": "dtn5odr9"
|
||||
},
|
||||
@@ -45519,6 +45522,38 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"_$id": "9y0dq6th",
|
||||
"_$type": "Box",
|
||||
"name": "mask",
|
||||
"width": 1920,
|
||||
"height": 960,
|
||||
"visible": false,
|
||||
"bottom": 0,
|
||||
"centerX": 0,
|
||||
"_$child": [
|
||||
{
|
||||
"_$id": "urbuggs2",
|
||||
"_$type": "Sprite",
|
||||
"name": "Sprite",
|
||||
"width": 1920,
|
||||
"height": 960,
|
||||
"alpha": 0.8,
|
||||
"_gcmds": [
|
||||
{
|
||||
"_$type": "DrawRectCmd",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1,
|
||||
"percent": true,
|
||||
"lineWidth": 1,
|
||||
"fillColor": "rgba(245, 247, 251, 1)"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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