|
@ -27,14 +27,24 @@ Suspend.prototype.suspendGame = function () { |
|
|
suspend.x = 50; |
|
|
suspend.x = 50; |
|
|
suspend.y = lib.properties.height - 100; |
|
|
suspend.y = lib.properties.height - 100; |
|
|
this.suspend = suspend; |
|
|
this.suspend = suspend; |
|
|
|
|
|
const _this = this; |
|
|
// 继续游戏
|
|
|
// 继续游戏
|
|
|
this.suspend.addEventListener( |
|
|
this.suspend.addEventListener( |
|
|
'click', |
|
|
'click', |
|
|
function () { |
|
|
function () { |
|
|
stage.removeChild(suspend); |
|
|
_this.hide(); |
|
|
continueMessage(); |
|
|
continueMessage(); |
|
|
}, |
|
|
}, |
|
|
false, |
|
|
false, |
|
|
); |
|
|
); |
|
|
stage.addChild(suspend); |
|
|
// stage.addChild(this.suspend);
|
|
|
|
|
|
// stage.removeChild(this.suspend);
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
Suspend.prototype.hide = function () { |
|
|
|
|
|
stage.removeChild(this.suspend); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
Suspend.prototype.show = function () { |
|
|
|
|
|
stage.addChild(this.suspend); |
|
|
}; |
|
|
}; |
|
|