Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想编写小型多平台游戏。我为我的游戏创建了 Construct2 插件,并且我有针对不同操作系统的任何特定方法。
如何在插件 runtime.js 中检测设备类型?
我找到了解决方案:
if (this.runtime.isAndroid) { // ... } else if (this.runtime.isiOS) { // ... } else if (this.runtime.isWindowsPhone8 || this.runtime.isWindowsPhone81) { // ... }