Pass projectile object to draw function
This commit is contained in:
+3
-3
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user