横屏提示

This commit is contained in:
草莓 2025-01-03 15:00:06 +08:00
parent 6e2e6149f9
commit 2d79c528a2
7 changed files with 61 additions and 51 deletions

View File

@ -1 +1 @@
N4IgZgNg9lBOCSATEAuEBnALrApjzADAIwgA0IAFjrFKqAJYC2AhgOY6qXVQB0ADgDtWZEMwFNmmDijDMI6HOQHNG0kAGFmTERABuqIuQp8WADwMFLRvhasgWysxfIPmqAuUkBrZyEQ4wX0Z/QJQiD3soARwAT3dyHFMbFAicAEcAV3oTHAFMVABtAF1yeilGdDoQAGMorDFMSpRQACMYHzDySDiwgF9yTBh5On6QdKy+JtB0AHc4RBI+0ehqqsR6XGrMeijODJtycxQAVnIe8NHINimQMpxGABF8LQhUbAzFEAyFACF8GbwAgAMvRWBR8ih3p8APrQhQ4RCw1AAJgA7MiAMyWDEADlOIFhsDEiOhKPRWIIuPxzFwzCaBVAjjUAB0MgAWHAEFqs47VNnIkQsSaFDRaRgUKCqEBFfqMlQs9mc7kZXn8wXMYUoAogABW9AyrAyYmlspATM4rI5XJ5fIFLg19JAAGkACoANRNpDlUrQrPRADZkX7kWASPbNdrXW6AGICmVes3yi0ZANBlMhsP2B0i1hQCCILyxT3ehVW5Wqu1ZiMgFr0CjfDK0eMl5NW5g2tXhx165hQTBiYTNxM+kCWzntlW29XV9BUIQCXQSqVD82+xUECcV6eO2f0BdLjgrpNr1PB0PbkV6hG94vDhWn9PnrsirC4fDEESvvCESuGgfVCgBxEP8hAAgc41NVdR3TQMz0zIVHVMeheyQgcPyPEdg1gx94OzLUQFQqBUKEAgIJKDAvGyVBZHkT5ANgZAUnIWF6MQdQ8zgJE0FwZBmOhO5GAACT3TAuOKPiIBwZhdBwIEoGqLjgFGWFdHodA7hJKov3fRYoVGFp/kBABBTB+2qLwHkkNwUAEDIIAgPj1nQZgWkkzTmgwbBvw/LUCiIDFjhKYoZUuPNoABWB6XIrAcE1Qws0wDoInQPg8EY8JyFfXw2HoXwRN8WoBCCHLVhkOQFEy/ttiwehqhuQZ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UKD2RN+Qi/j2kaGoug7Jomd6pnytqmPQnbwT2r57gOfpQcm95lnBCFQEhQgEKBJQYF42SoLI8gvH+sDICkuLgtRiDqFmcBwmguDIPREA4Mwug4H8UDVGx0z0bo9DoJchJVO+L4kKCsDPKMLTfL8ACCmDdtUXjXJIbgoAIGQQBARiSBxqDkugpFGfEJH0EZABy+4QcirIiJCizoMwLTcVJzQYNgH6vmqBREPC8IlMUEonFm0A/LA1LEVgOCqhELCYB0EToHweC0eE5BPr4bD0L4W4gnlNTrGEqVFfMMhyAo+XdqsWD0NU5yDN2EAOkw0jwtyhyIomPCIoco1jWiaL7DUGSwLA3UekQKJMocPBopY60bQQmLWDZLSSJg3EGC4UR5nRYxJLt+3cTpLDsDZfBQOJUQ3Ww0ipKY2DMC9d1nYwUB8dcSw4CsEA9OSgICHAOAAMpSKqFndrAIKYocRBDWiMwmTRnCnn5MmEHJoB8oUHik6QZMU+TpAFAAtIYdOkAzTOGB4zOM/THPs+zJQU1F5A0BkUicH88BOqwAAaqkaqp1yqX8rBpIwADyUBfAAorsuwCAAqqpAC8Ii6HIzxTKMfHxWsAhxocOCYogHItLsBBeswhz2xkhyEc7CqTUyFoEGAjIDUQgTkLq9C0SAiItCyLSIOi4JEMwTLMOCTJgCihzgmiiCYi04K7JiuzwgETKIIgYCHEyIirAtKJFxN3q7EQmIt70QA=

View File

@ -1 +1 @@
{"viewportLoc":[0,0],"editorLastFloorId":"jiedao","lastUsed":[{"idnum":43,"id":"sword5","images":"items","y":54,"recent":1735710095206,"frequent":1},{"idnum":41,"id":"sword4","images":"items","y":53,"recent":1735710093206,"frequent":1},{"idnum":39,"id":"sword3","images":"items","y":52,"recent":1735710091127,"frequent":1},{"idnum":37,"id":"sword2","images":"items","y":51,"recent":1735710088598,"frequent":1},{"idnum":35,"id":"sword1","images":"items","y":50,"recent":1735710086310,"frequent":1},{"idnum":36,"id":"shield1","images":"items","y":55,"recent":1735710097750,"frequent":1}]}
{"viewportLoc":[0,0],"editorLastFloorId":"street02","lastUsed":[{"idnum":43,"id":"sword5","images":"items","y":54,"recent":1735710095206,"frequent":1},{"idnum":41,"id":"sword4","images":"items","y":53,"recent":1735710093206,"frequent":1},{"idnum":39,"id":"sword3","images":"items","y":52,"recent":1735710091127,"frequent":1},{"idnum":37,"id":"sword2","images":"items","y":51,"recent":1735710088598,"frequent":1},{"idnum":35,"id":"sword1","images":"items","y":50,"recent":1735710086310,"frequent":1},{"idnum":36,"id":"shield1","images":"items","y":55,"recent":1735710097750,"frequent":1}]}

View File

@ -865,28 +865,8 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"function": "function(){\ncore.addItem('book', 1)\ncore.addItem('fly', 1)\n}"
},
{
"type": "if",
"condition": "((!main.replayChecking )&&(!core.isReplaying()))",
"true": [
{
"type": "if",
"condition": "(!core.platform.isPC)",
"true": [
{
"type": "confirm",
"default": true,
"text": "手机用户横屏体验更佳,是否切换",
"yes": [
{
"type": "function",
"function": "function(){\ncore.triggerFullscreenture\n}"
}
],
"no": []
}
]
}
]
"type": "insert",
"name": "强制横屏"
}
],
"shops": [

View File

@ -4057,7 +4057,39 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
"chapter02": null,
"chapter03": null,
"chapter04": null,
"chapter05": null
"chapter05": null,
"强制横屏": [
{
"type": "if",
"condition": "((!main.replayChecking )&&(!core.isReplaying()))",
"true": [
{
"type": "if",
"condition": "((screen.orientation || {}).type ||\n screen.mozOrientation ||\n screen.msOrientation!==\"landscape-primary\")",
"true": [
{
"type": "if",
"condition": "(!core.platform.isPC)",
"true": [
{
"type": "confirm",
"default": true,
"text": "手机用户横屏体验更佳,是否切换",
"yes": [
{
"type": "function",
"function": "function(){\ncore.triggerFullscreen(true)\n}"
}
],
"no": []
}
]
}
]
}
]
}
]
},
"CommonEventTemplate": {
"检测音乐如果没有开启则系统提示开启": [

View File

@ -26,12 +26,6 @@ main.floors.street01=
"direction": "up"
}
],
"5,10": [
{
"type": "insert",
"name": "chapter0"
}
],
"6,11": [
{
"type": "insert",

View File

@ -1044,7 +1044,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
},
"loadData": function (data, callback) {
// 读档操作;从存储中读取了内容后的行为
const play = core.status.played
// 重置游戏和路线
core.resetGame(data.hero, data.hard, data.floorId, core.maps.loadMap(data.maps, null, data.hero.flags), data.values);
core.status.route = core.decodeRoute(data.route);
@ -1071,25 +1071,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// TODO增加自己的一些读档处理
core.ui.statusBar.clearItemInfo()
core.ui.statusBar.update();
core.insertAction([{
"type": "if",
"condition": "((!main.replayChecking )&&(!core.isReplaying()))",
"true": [{
"type": "if",
"condition": "(!core.platform.isPC)",
"true": [{
"type": "confirm",
"default": true,
"text": "手机用户横屏体验更佳,是否切换",
"yes": [
{ "type": "function", "function": "function(){\ncore.triggerFullscreenture\n}" },
],
"no": [
]
}, ]
}, ]
}])
// 切换到对应的楼层
core.changeFloor(data.floorId, null, data.hero.loc, 0, function () {
// TODO可以在这里设置读档后播放BGM
@ -1098,9 +1080,12 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
}
core.removeFlag('__fromLoad__');
if (!play) core.insertCommonEvent('强制横屏')
if (callback) callback();
});
core.doAction()
if (play) core.doAction()
},
"getStatusLabel": function (name) {
// 返回某个状态英文名的对应中文标签如atk -> 攻击def -> 防御等。

View File

@ -14414,5 +14414,24 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
await document.body.requestFullscreen();
}
}
this.abc = function () {
var orientation =
(screen.orientation || {}).type ||
screen.mozOrientation ||
screen.msOrientation;
if (orientation === "landscape-primary") {
console.log("That looks good.");
} else if (orientation === "landscape-secondary") {
console.log("Mmmh... the screen is upside down!");
} else if (
orientation === "portrait-secondary" ||
orientation === "portrait-primary"
) {
console.log("Mmmh... you should rotate your device to landscape");
} else if (orientation === undefined) {
console.log("The orientation API isn't supported in this browser :(");
}
}
}
}