0

我想编写小型多平台游戏。我为我的游戏创建了 Construct2 插件,并且我有针对不同操作系统的任何特定方法。

如何在插件 runtime.js 中检测设备类型?

4

1 回答 1

0

我找到了解决方案:

if (this.runtime.isAndroid) {
    // ...
} else if (this.runtime.isiOS) {
    // ...
} else if (this.runtime.isWindowsPhone8 || this.runtime.isWindowsPhone81) {
    // ...
}
于 2016-06-09T13:25:21.977 回答