Refactor inverse shockwave

This commit is contained in:
2021-09-26 12:09:44 +01:00
parent a823d4c6df
commit 79b2692199
15 changed files with 87 additions and 94 deletions
+4 -4
View File
@@ -18,7 +18,7 @@ aGenBulAt
-> Particle
aGenBulAt maycid pos vel hiteff width = BulletPt
{ _ptDraw = drawBul
, _ptUpdate' = mvGenBullet
, _ptUpdate = mvGenBullet
, _btVel' = vel
, _btColor' = V4 2 2 2 2
, _btTrail' = [pos]
@@ -37,7 +37,7 @@ aDelayedBulAt
-> Particle
aDelayedBulAt vfact maycid pos vel hiteff width = BulletPt
{ _ptDraw = drawBul
, _ptUpdate' = \w -> resetVel . mvGenBullet w
, _ptUpdate = \w -> resetVel . mvGenBullet w
, _btVel' = vfact *.* vel
, _btColor' = V4 2 2 2 2
, _btTrail' = [pos]
@@ -47,7 +47,7 @@ aDelayedBulAt vfact maycid pos vel hiteff width = BulletPt
, _btHitEffect' = hiteff
}
where
resetVel = second $ fmap $ (ptUpdate' .~ mvGenBullet) . (btVel' .~ vel)
resetVel = second $ fmap $ (ptUpdate .~ mvGenBullet) . (btVel' .~ vel)
aCurveBulAt
:: Maybe Int -- ^ Pass-through creature id
@@ -60,7 +60,7 @@ aCurveBulAt
-> Particle
aCurveBulAt maycid col pos control targ hiteff width = BulletPt
{ _ptDraw = drawBul
, _ptUpdate' = \w -> mvGenBullet w . setVel
, _ptUpdate = \w -> mvGenBullet w . setVel
, _btVel' = V2 0 0
, _btColor' = col
, _btTrail' = [pos]