瀏覽代碼

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,


Loading…
取消
儲存