Refactor sound

This commit is contained in:
2021-09-12 17:52:34 +01:00
parent ea333a363b
commit 51a85bd1ec
97 changed files with 409 additions and 177 deletions
+4 -4
View File
@@ -12,7 +12,7 @@ import Dodge.WorldEvent.SpawnParticle
--import Dodge.WorldEvent.Flash
import Dodge.RandomHelp
import Dodge.SoundLogic
import Dodge.SoundLogic.Synonyms
import Dodge.SoundLogic.LoadSound
import Dodge.WorldEvent.Shockwave
import Geometry
import Geometry.Vector3D
@@ -30,7 +30,7 @@ makePoisonExplosionAt
-> World
-> World
makePoisonExplosionAt p w
= soundMultiFrom [Explosion 0,Explosion 1] p grenadeBang Nothing
= soundMultiFrom [Explosion 0,Explosion 1] p bangS Nothing
$ foldr (makeGasCloud p) w vels
where
vels = replicateM 25 (randInCirc 2) & evalState $ _randGen w
@@ -58,7 +58,7 @@ makeFlameExplosionAt
-> World
-> World
makeFlameExplosionAt p w
= soundMultiFrom [Explosion 0,Explosion 1] p grenadeBang Nothing
= soundMultiFrom [Explosion 0,Explosion 1] p bangS Nothing
$ over particles (newFlames ++ ) w
where
newFlames = zipWith makeFlameWithVelAndTime velocities timers
@@ -73,7 +73,7 @@ makeExplosionAt
-> World
-> World
makeExplosionAt p w
= soundMultiFrom [Explosion 0,Explosion 1] p grenadeBang Nothing
= soundMultiFrom [Explosion 0,Explosion 1] p bangS Nothing
. addFlames
-- . explosionFlashAt p
. over tempLightSources (theTLS :)