Add sound on spawn, allow for filtering of to play sounds

This commit is contained in:
2025-12-05 23:19:06 +00:00
parent a4f8369420
commit f9ce58b409
19 changed files with 752 additions and 695 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
module Main (main) where
import Dodge.SoundSelection
import Control.Lens
import Control.Monad
import Control.Parallel
@@ -108,7 +109,7 @@ updateRenderSplit win u = do
playSoundUnlessRewinding :: Universe -> IO (M.Map SoundOrigin Sound)
playSoundUnlessRewinding u = case w ^. timeFlow of
NormalTimeFlow -> playSoundAndUpdate (_soundData $ _preloadData u) (_playingSounds w) (_toPlaySounds w)
NormalTimeFlow -> playSoundAndUpdate (_soundData $ _preloadData u) (_playingSounds w) (newSoundsToPlay u)
_ -> stopAllSounds >> return M.empty
where
w = _uvWorld u