فهرست منبع

Quiet background when you win;

bjorn 10 سال پیش
والد
کامیت
e323eece98
2فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 1 1
      game.lua
  2. 1 0
      pigeon.lua

+ 1 - 1
game.lua

@@ -25,7 +25,7 @@ function Game:load()
 
   self.map:spawnHuts()
 
-  ctx.sound:loop('background', function(sound)
+  self.backgroundSound = ctx.sound:loop('background', function(sound)
     sound:setVolume(.25)
   end)
 

+ 1 - 0
pigeon.lua

@@ -182,6 +182,7 @@ function Pigeon:update()
     if not ctx.hud.win.active then
       ctx.hud:activateWin()
       ctx.sound:play('win')
+      ctx.backgroundSound:setVolume(.1)
     end
   end
 end