【问题标题】:How to force a HTML5 game to load in landscape mode in Mobile browser?如何强制 HTML5 游戏在移动浏览器中以横向模式加载?
【发布时间】:2018-07-25 15:21:20
【问题描述】:

我正在开发一款横向模式的 2D 射击游戏。当我在桌面中查看它时,它运行良好。我也想在移动设备上提供相同的体验。与用户的方向无关。

有可能吗?如果是,如何实现?

【问题讨论】:

标签: html html5-canvas coronasdk phaser-framework mobile-browser


【解决方案1】:

如果我理解正确,您想要做的是锁定设备上可能的方向。为此,您需要编辑 build.settings 文件中的设置,例如:

orientation =
{
    default = "landscapeRight",
    supported =
    {
        "landscapeRight", "landscapeLeft"
    }
}

请参阅“App Orientation”部分中的官方文档here

【讨论】:

    猜你喜欢
    • 2020-06-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-07-24
    • 2015-01-24
    • 1970-01-01
    相关资源
    最近更新 更多