Remove loop dependency on loading dodge sounds

This commit is contained in:
2021-03-27 13:42:14 +01:00
parent 2897c65e9e
commit 2011728de5
10 changed files with 171 additions and 153 deletions
+18
View File
@@ -0,0 +1,18 @@
module Dodge.WorldEvent.Sound
where
import Dodge.Data
import Dodge.SoundLogic
import System.Random
import Control.Lens
mkSoundBreakGlass :: World -> World
mkSoundBreakGlass w = soundOnce soundid $ set randGen g w
where
(soundid,g) = _randGen w & randomR (37,40)
mkSoundSplinterGlass :: World -> World
mkSoundSplinterGlass w = soundOnce soundid $ set randGen g w
where
(soundid,g) = _randGen w & randomR (33,36)