为新客户端的导入离线包/完整包功能提前做适配

This commit is contained in:
nonameShijian 2024-05-17 15:07:02 +08:00
parent 2107f6618c
commit cf6ec448a9
1 changed files with 5 additions and 0 deletions

View File

@ -18,6 +18,11 @@ export async function cordovaReady() {
game.reload();
}
}, false);
window.addEventListener("importPackage", () => {
if (confirm(`离线包/完整包已导入成功,是否重启游戏?`)) {
game.reload();
}
}, false);
document.addEventListener("pause", function () {
if (!_status.paused2 && typeof _status.event.isMine == "function" && !_status.event.isMine()) {
ui.click.pause();