浏览代码

bug #1915: Fixed music not playing

tags/v0.11.0
Shaun 2 年前
父节点
当前提交
67f5b140db
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. +1
    -1
      src/client/js/objects/objects.js
  2. +2
    -2
      src/server/clientComponents/sound.js

+ 1
- 1
src/client/js/objects/objects.js 查看文件

@@ -167,7 +167,7 @@ define([
events.emit('onGetPlayer', obj);
window.player = obj;

sound.unload(obj.zoneName);
sound.unload(obj.zoneId);

renderer.setPosition({
x: (obj.x - (renderer.width / (scale * 2))) * scale,


+ 2
- 2
src/server/clientComponents/sound.js 查看文件

@@ -14,11 +14,11 @@ define([
init: function () {
const {
sound, volume, music, defaultMusic, loop = true,
obj: { zoneName, x, y, width, height, area }
obj: { zoneId, x, y, width, height, area }
} = this;

const config = {
scope: zoneName,
scope: zoneId,
file: sound,
volume,
x,


正在加载...
取消
保存