其他 SDK 对象和参数
screen 对象
包含用于屏幕操作的设置:
{
    fullscreen: {
        status: function(): "on"|"off",
        request: function(): nil,
        exit: function(): nil
    },
    orientation: {
        get: function(): "portrait"|"landscape",
        set: function(value: "portrait"|"landscape")
    }
}
注意
Yandex Games 可以全屏模式自动启动,但许多浏览器不支持在没有用户命令的情况下切换模式。
Yandex Games 屏幕的左上角有一个用于切换到全屏模式的按钮,因此可以使用 screen.fullscreen 对象参数直接处理游戏中的按钮。
clipboard 对象
用于通过 ysdk.clipboard.write_text(text: string) 方法向剪贴板中写入一行。
device_info 对象
用于通过 ysdk.device_info() 方法获取关于用户设备的信息。
{
    type: "mobile"|"desktop"|"tablet"|"tv",
    isMobile: boolean,
    isDesktop: boolean,
    isTablet: boolean,
    isTV: boolean,
}
这篇文章是否有用?
上一篇
下一篇