2
0
bjorn 10 жил өмнө
parent
commit
6a33267b77
2 өөрчлөгдсөн 7 нэмэгдсэн , 0 устгасан
  1. BIN
      media/sounds/disco.ogg
  2. 7 0
      pigeon.lua

BIN
media/sounds/disco.ogg


+ 7 - 0
pigeon.lua

@@ -136,6 +136,7 @@ function Pigeon:init()
   self.drop = nil
   self.downDirty = 0
   self.crushGrace = 0
+  self.rainbowShitSound = nil
 
   self:initBeak()
   self:initFeet()
@@ -154,6 +155,8 @@ function Pigeon:update()
 
   --self.animation.scale = self.rainbowShitTimer > 0 and 1 or .7
   self.rainbowShitTimer = timer.rot(self.rainbowShitTimer, function()
+    ctx.backgroundSound:resume()
+    self.rainbowShitSound:stop()
     flux.to(self.animation, .2, {scale = .7}, 'elasticout')
   end)
 
@@ -408,6 +411,10 @@ end
 
 function Pigeon:activateRainbowShit()
   self.rainbowShitTimer = self.rainbowShitTimer + 5
+  ctx.backgroundSound:pause()
+  self.rainbowShitSound = ctx.sound:loop('disco', function(sound)
+    sound:setVolume(.5)
+  end)
   flux.to(self.animation, .2, {scale = 1}, 'elasticout')
 end