Add ItEffect data as parameter to the effect itself

This commit is contained in:
jgk
2021-05-24 21:37:42 +02:00
parent 38682049c4
commit a7d4d8911d
12 changed files with 109 additions and 59 deletions
+2 -2
View File
@@ -248,7 +248,7 @@ makeTeslaArcAt i pos dir = Projectile
, _pjVel = (0,0)
, _pjDraw = \_ -> onLayer PtLayer $ line [(0,0),(0,0)]
, _pjID = i
, _pjUpdate = moveTeslaArc pos dir i
, _pjUpdate = \_ -> moveTeslaArc pos dir i
}
moveTeslaArc
@@ -260,7 +260,7 @@ moveTeslaArc
moveTeslaArc p d i w =
set (projectiles . ix i . pjDraw) (\_ -> pic)
$ set (projectiles . ix i . pjUpdate)
(pjTimer 2 i)
(\_ -> pjTimerF 2 i)
$ set randGen g
$ createSpark 8 nc q2 (argV sv + d1) Nothing
$ foldr damCrs w hitCrs