Add sound on spawn, allow for filtering of to play sounds
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
module Dodge.SoundSelection (newSoundsToPlay) where
|
||||
|
||||
import Sound.Data
|
||||
import Dodge.Data.Universe
|
||||
import qualified Data.Map.Strict as M
|
||||
import Control.Lens
|
||||
|
||||
newSoundsToPlay :: Universe -> M.Map SoundOrigin Sound
|
||||
newSoundsToPlay u = case u ^. uvWorld . wSoundFilter of
|
||||
NoSoundFilter -> u ^. uvWorld . toPlaySounds
|
||||
FilterBySoundOrigin ks -> (u ^. uvWorld . toPlaySounds) `M.restrictKeys` ks
|
||||
|
||||
Reference in New Issue
Block a user