Refactor basic explosion

This commit is contained in:
2021-03-23 14:50:23 +01:00
parent 885fa4a67e
commit b13467053a
6 changed files with 32 additions and 61 deletions
+3 -3
View File
@@ -13,7 +13,7 @@ import qualified Data.IntMap.Strict as IM
drawCircleAtFor :: Point2 -> Int -> World -> World
drawCircleAtFor p t w =
let n = newParticleKey w
let n = newProjectileKey w
in over projectiles ( IM.insert n
Projectile { _ptPos = p
, _ptStartPos = p
@@ -24,7 +24,7 @@ drawCircleAtFor p t w =
} ) w
drawCircleAtForCol :: Point2 -> Int -> Color -> World -> World
drawCircleAtForCol p t col w =
let n = newParticleKey w
let n = newProjectileKey w
in over projectiles ( IM.insert n
Projectile { _ptPos = p
, _ptStartPos = p
@@ -35,7 +35,7 @@ drawCircleAtForCol p t col w =
} ) w
drawLineForCol :: [Point2] -> Int -> Color -> World -> World
drawLineForCol ps t col w =
let n = newParticleKey w
let n = newProjectileKey w
in over projectiles ( IM.insert n
Projectile { _ptPos = head ps
, _ptStartPos = head ps