瀏覽代碼

Complex quieter;

bjorn 10 年之前
父節點
當前提交
fb918220a9
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      game.lua

+ 3 - 1
game.lua

@@ -25,7 +25,9 @@ function Game:load()
 
   self.map:spawnHuts()
 
-  ctx.sound:loop('background')
+  ctx.sound:loop('background', function(sound)
+    sound:setVolume(.5)
+  end)
 
   self.world:setContactFilter(function(fixtureA, fixtureB)
     local a, b = fixtureA:getBody():getUserData(), fixtureB:getBody():getUserData()