Modularise item data, change tesla arc from projectile to particle
This commit is contained in:
@@ -36,14 +36,15 @@ makeTeslaExplosionAt
|
||||
:: Point2 -- ^ Position
|
||||
-> World
|
||||
-> World
|
||||
makeTeslaExplosionAt pos w = soundOncePos grenadeBang pos $ foldr ($) w listOfFunctions -- a bit shorter
|
||||
where
|
||||
xs = randomRs (0, 2*pi) $ _randGen w
|
||||
j = newProjectileKey w
|
||||
pks = [j..]
|
||||
listOfFunctions = map
|
||||
(\i -> over projectiles (IM.insert (pks!!i) (makeTeslaArcAt (pks!!i) pos (xs!!i))))
|
||||
[1 .. 29]
|
||||
makeTeslaExplosionAt pos w = undefined
|
||||
-- soundOncePos grenadeBang pos $ foldr ($) w listOfFunctions -- a bit shorter
|
||||
-- where
|
||||
-- xs = randomRs (0, 2*pi) $ _randGen w
|
||||
-- j = newProjectileKey w
|
||||
-- pks = [j..]
|
||||
-- listOfFunctions = map
|
||||
-- (\i -> over projectiles (IM.insert (pks!!i) (makeTeslaArcAt (pks!!i) pos (xs!!i))))
|
||||
-- [1 .. 29]
|
||||
|
||||
makeFlameExplosionAt
|
||||
:: Point2 -- ^ Position
|
||||
|
||||
Reference in New Issue
Block a user