소스 검색

Random seed;

bjorn 10 년 전
부모
커밋
3696ed81b9
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      pigeon.lua

+ 2 - 0
pigeon.lua

@@ -75,6 +75,7 @@ function Pigeon:init()
         self.rightWhirr:stop()
       end
 
+      love.math.setRandomSeed(love.timer.getTime())
       self.leftWhirr = ctx.sound:play('whirr', function(sound)
         sound:setVolume(.35)
         sound:setPitch(.9 + love.math.random() * .2)
@@ -102,6 +103,7 @@ function Pigeon:init()
         self.leftWhirr:stop()
       end
 
+      love.math.setRandomSeed(love.timer.getTime())
       self.rightWhirr = ctx.sound:play('whirr', function(sound)
         sound:setVolume(.35)
         sound:setPitch(.9 + love.math.random() * .2)