Refactor inverse shockwave
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user