Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
在跑 Treasures 这个 demo 的时候,会发现打开网页的 ”start game“ 按钮没反应,经排查发现是
web-server/public/js/main.js 中的 pomelo.request(‘area.playerHandler.getAnimation’ 没有执行。
解决办法是,在命令行中查询 pomelo 最新版本号:
$ pomelo —version
然后更新 game-server/package.json 中的 dependencies.pomelo 为最新版本,接着重新安装依赖:
$ sudo sh npm-install.sh
最后重启应用即可。
进入游戏后无法捡宝
进入游戏后是捡宝物,但点宝物无反应,控制台还报错。
问题出在 game-server/app/util/dispatcher.js 中
var index = Math.abs(parseInt(crc.crc32(uid)),16) % connectors.length;
应改为:
var index = Math.abs(parseInt(crc.crc32(uid),16)) % connectors.length;
改完后重启应用即可。