Refactor sounds
This commit is contained in:
@@ -28,7 +28,9 @@ makePoisonExplosionAt
|
||||
:: Point2 -- ^ Position
|
||||
-> World
|
||||
-> World
|
||||
makePoisonExplosionAt p w = soundOncePos grenadeBang p $ foldr (makeGasCloud p) w vels
|
||||
makePoisonExplosionAt p w
|
||||
= soundMultiFrom [Explosion 0,Explosion 1] p grenadeBang Nothing
|
||||
$ foldr (makeGasCloud p) w vels
|
||||
where
|
||||
vels = replicateM 25 (randInCirc 2) & evalState $ _randGen w
|
||||
-- just change the number after replicateM to get more or less clouds
|
||||
@@ -54,7 +56,9 @@ makeFlameExplosionAt
|
||||
:: Point2 -- ^ Position
|
||||
-> World
|
||||
-> World
|
||||
makeFlameExplosionAt p w = soundOncePos grenadeBang p $ over particles (newFlames ++ ) w
|
||||
makeFlameExplosionAt p w
|
||||
= soundMultiFrom [Explosion 0,Explosion 1] p grenadeBang Nothing
|
||||
$ over particles (newFlames ++ ) w
|
||||
where
|
||||
newFlames = zipWith makeFlameWithVelAndTime velocities timers
|
||||
makeFlameWithVelAndTime vel time = aFlameParticle time p vel Nothing
|
||||
@@ -68,7 +72,7 @@ makeExplosionAt
|
||||
-> World
|
||||
-> World
|
||||
makeExplosionAt p w
|
||||
= soundOncePos grenadeBang p
|
||||
= soundMultiFrom [Explosion 0,Explosion 1] p grenadeBang Nothing
|
||||
. addFlames
|
||||
-- . explosionFlashAt p
|
||||
. over tempLightSources (theTLS :)
|
||||
|
||||
Reference in New Issue
Block a user