Cleanup, add spark to bullet turret hit

This commit is contained in:
2022-02-13 17:51:15 +00:00
parent 40f1d987cb
commit 4f0f8cb4c2
7 changed files with 25 additions and 29 deletions
+2 -4
View File
@@ -34,9 +34,8 @@ makePoisonExplosionAt
-> World
makePoisonExplosionAt p w
= soundMultiFrom [Explosion 0,Explosion 1] p bangS Nothing
$ foldr (makeGasCloud p) w vels
where
vels = replicateM 25 (randInCirc 2) & evalState $ _randGen w
$ foldr (makeGasCloud p) w
$ replicateM 25 (randInCirc 2) & evalState $ _randGen w
-- just change the number after replicateM to get more or less clouds
-- suggested change: use random positions, offset from p, rather than velocities
-- so, p +.+ randomOffset
@@ -93,4 +92,3 @@ makeExplosionAt p w
newFs = zipWith5 mF fPs zs (fmap (3 *.*) fVs') sizes times
addFlames w' = foldr ($) w' newFs
pushAgainstWalls q = maybe q (uncurry (+.+)) $ reflectPointWalls p q $ wallsNearPoint q w