Continue tweaking sound

This commit is contained in:
2021-09-12 20:33:33 +01:00
parent 51a85bd1ec
commit 72657294d1
89 changed files with 373 additions and 517 deletions
+3 -3
View File
@@ -7,17 +7,17 @@ import Dodge.SoundLogic.LoadSound
import Geometry.Data
import Dodge.RandomHelp
import System.Random
--import System.Random
import Control.Lens
import Control.Monad.State.Lazy
mkSoundBreakGlass :: Point2 -> World -> World
mkSoundBreakGlass p w = soundOnceOrigin soundid (GlassBreakSound 0) p $ set randGen g w
mkSoundBreakGlass p w = soundStart (GlassBreakSound 0) p soundid Nothing $ set randGen g w
where
(soundid,g) = _randGen w & runState (takeOne [glassShat1S,glassShat2S,glassShat3S,glassShat4S])
mkSoundSplinterGlass :: Point2 -> World -> World
mkSoundSplinterGlass p w = soundOnceOrigin soundid (GlassBreakSound 1) p $ set randGen g w
mkSoundSplinterGlass p w = soundStart (GlassBreakSound 1) p soundid Nothing $ set randGen g w
where
(soundid,g) = _randGen w & runState (takeOne [smallGlass1S,smallGlass2S,smallGlass3S,smallGlass4S])
+1 -1
View File
@@ -99,7 +99,7 @@ moveFlame rotd w pt
_ -> (glare $ doSound damcrs , mvPt)
where
time = _btTimer' pt
doSound = soundFrom Flame (V2 x y) fireS (Just 2) -- . over worldEvents ((.) $ flameGlareAt ep)
doSound = soundContinue Flame (V2 x y) fireS (Just 2) -- . over worldEvents ((.) $ flameGlareAt ep)
glare
| time `mod` 5 == 0
= tempLightSources %~ (theTLS :)