module Dodge.WorldEvent.Sound where import Dodge.Data import Dodge.SoundLogic import System.Random import Control.Lens mkSoundBreakGlass :: Point2 -> World -> World mkSoundBreakGlass p w = soundOnceOrigin soundid (GlassBreakSound 0) p $ set randGen g w where (soundid,g) = _randGen w & randomR (37,40) mkSoundSplinterGlass :: Point2 -> World -> World mkSoundSplinterGlass p w = soundOnceOrigin soundid (GlassBreakSound 1) p $ set randGen g w where (soundid,g) = _randGen w & randomR (33,36)