Tweak explosions
This commit is contained in:
@@ -70,8 +70,8 @@ makeFlameExplosionAt p w =
|
||||
-- the ( Nthing :: Maybe Int ) here is "maybe" a creature id that the
|
||||
-- particle passes through for the first frame of its existence
|
||||
|
||||
makeExplosionAt :: Point2 -> World -> World
|
||||
makeExplosionAt p w =
|
||||
makeExplosionAt :: Point2 -> Point2 -> World -> World
|
||||
makeExplosionAt p vel w =
|
||||
w
|
||||
& soundMultiFrom [Explosion 0, Explosion 1] p bangS Nothing
|
||||
& addFlames
|
||||
@@ -93,8 +93,9 @@ makeExplosionAt p w =
|
||||
fVs' = zipWith (+.+) fVs $ map inversePushOut fPs'
|
||||
sizes = randomRs (2, 9) $ _randGen w
|
||||
times = randomRs (15, 20) $ _randGen w
|
||||
mF q z v size time = makeFlamelet q z v size time
|
||||
newFs = zipWith5 mF fPs zs (fmap (3 *.*) fVs') sizes times
|
||||
mF q z v size time = makeFlamelet (q - vel) z (v + vel) size time
|
||||
--newFs = zipWith5 mF fPs zs (fmap (3 *.*) fVs') sizes times
|
||||
newFs = zipWith4 (mF p) zs (zipWith ((+) . xyV3) fPs'' (fmap (3 *.*) fVs')) sizes times
|
||||
addFlames w' = foldl' (flip ($)) w' newFs
|
||||
--pushAgainstWalls q = maybe q (uncurry (+.+)) $ reflectPointWalls p q wls
|
||||
--pushAgainstWalls q = maybe q fst $ reflectPointWalls p q wls
|
||||
|
||||
Reference in New Issue
Block a user