Pass projectile object to draw function

This commit is contained in:
jgk
2021-05-24 14:21:13 +02:00
parent a15d592951
commit 38682049c4
10 changed files with 36 additions and 34 deletions
+3 -3
View File
@@ -14,7 +14,7 @@ drawCircleAtFor p t w = w & projectiles %~
{ _pjPos = p
, _pjStartPos = p
, _pjVel = (0,0)
, _pjPict = onLayer PtLayer $ uncurry translate p $ color white $ circleSolid 20
, _pjDraw = \_ -> onLayer PtLayer $ uncurry translate p $ color white $ circleSolid 20
, _pjID = k
, _pjUpdate = pjTimer t k
}
@@ -26,7 +26,7 @@ drawCircleAtForCol p t col w = w & projectiles %~
{ _pjPos = p
, _pjStartPos = p
, _pjVel = (0,0)
, _pjPict = onLayer PtLayer $ uncurry translate p $ color col $ circleSolid 20
, _pjDraw = \_ -> onLayer PtLayer $ uncurry translate p $ color col $ circleSolid 20
, _pjID = k
, _pjUpdate = pjTimer t k
}
@@ -38,7 +38,7 @@ drawLineForCol ps t col w = w & projectiles %~
{ _pjPos = head ps
, _pjStartPos = head ps
, _pjVel = (0,0)
, _pjPict = onLayer PtLayer $ color col $ lineOfThickness 5 ps
, _pjDraw = \_ -> onLayer PtLayer $ color col $ lineOfThickness 5 ps
, _pjID = k
, _pjUpdate = pjTimer t k
}