Tweak clouds

This commit is contained in:
2021-03-27 15:53:30 +01:00
parent eb2a1a0edb
commit 2956fb6379
3 changed files with 6 additions and 20 deletions
-15
View File
@@ -15,18 +15,6 @@ resumeSound w = w
soundOnce :: Int -> World -> World
soundOnce i = over soundQueue ((:) i)
--continueSoundFrom :: SoundOrigin -> Int -> Int -> Int -> World -> World
--continueSoundFrom so sType time fadeTime w = over sounds (M.insertWith f so sound) w
-- where
-- sound = Sound
-- { _soundType = sType
-- , _soundTime = time
-- , _soundFadeTime = fadeTime
-- , _soundChannel = Nothing
-- , _soundPos = Nothing
-- }
-- f _ s = s {_soundTime = time, _soundFadeTime = fadeTime}
soundOnceOrigin :: Int -> SoundOrigin -> World -> World
soundOnceOrigin sType so = over sounds (M.insertWith (flip const) so sound)
where
@@ -66,9 +54,6 @@ soundMultiFrom (so:sos) sType time fadeTime w
stopSoundFrom :: SoundOrigin -> World -> World
stopSoundFrom so = over (sounds . ix so . soundTime) (fmap $ min 0)
-- idea: pass the id of the sound to the world and send it to some queue for
-- playback
reloadSound,putDownSound,pickUpSound,fireSound,grenadeBang,healSound,teleSound,twoStepSlowSound :: Int
clickSound = 1
reloadSound = 2