Pārlūkot izejas kodu

Complex quieter;

bjorn 10 gadi atpakaļ
vecāks
revīzija
fb918220a9
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  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()