Quintus到Android

时间:2014-10-03 21:57:33

标签: html5 phonegap-build cocoonjs

我曾尝试使用谷歌并阅读Quintus维基但没有解决方案。为什么quintus platformer需要运行服务器?因为这个我不能使用phonegap或cocoonjs将我的项目转换为android游戏。是否有更好的HTML5 2D游戏引擎,我可以在没有服务器的情况下使用?或者我该怎么办才能让quintus作为android应用程序运行?

1 个答案:

答案 0 :(得分:3)

所以我终于设法让游戏在一点点帮助下运行,所以我在这里为自己回答。要在Android手机上运行游戏,您需要引用一些代码。

尝试从quintus.js文件中注释掉此代码,然后重试。我遇到了类似的问题,评论出这段代码解决了它:

if(document.location.origin === "file://" || document.location.origin === "null") {
  if(!Q.fileURLAlert) {
    Q.fileURLAlert = true;
    alert("Quintus Error: Loading assets is not supported from file:// urls - please run from a local web-server and try again");
  }
  return errorCallback();

然后使用 CocoonJS Webview + 进行编译并安装debug.apk以使游戏运行。

相关问题