html5 libgdx应用程序在哪里保存首选项文件?

时间:2014-12-30 10:54:09

标签: java html5 libgdx

我在这里阅读:https://github.com/libgdx/libgdx/wiki/Preferences

首选项文件将保存到~/.prefs/(我在linux上)。

当我运行桌面应用程序时,它工作正常,并将首选项文件保存到正确的位置。但是使用html5,它并没有保存该文件!我确定它已保存在某处,因为游戏仍然可以读取它(它包含分数)。

我的代码很简单,只是:

    Preferences score = Gdx.app.getPreferences("Highscore");
    score.putInteger("score", _points);
    score.flush();

我通过运行

构建了游戏
./gradlew html:dist

并在python

创建的localhost上运行它
python -m SimpleHTTPServer

然后转到Firefox上的http://localhost:8000

有人可以帮忙吗?感谢您的阅读,祝您度过愉快的一天。

0 个答案:

没有答案
相关问题