Unify bullet creation
This commit is contained in:
@@ -51,7 +51,7 @@ bulBounceArmCr' bt p cr w
|
||||
pOut = p +.+ 2 *.* newDir
|
||||
reflectVel = magV bulVel *.* newDir
|
||||
addBouncer = instantParticles .:~ bouncer
|
||||
bouncer = (aGenBulAt Nothing pOut reflectVel (_btDrag bt)
|
||||
bouncer = (aBulAt Nothing id (Just (_ptColor bt)) Nothing pOut reflectVel (_btDrag bt)
|
||||
(_ptHitEff bt) (_ptWidth bt)
|
||||
) {_ptTimer = _ptTimer bt - 1}
|
||||
{- | Bullet pass through creatures. -}
|
||||
@@ -70,7 +70,7 @@ bulPenCr' bt p cr w = w
|
||||
cid = _crID cr
|
||||
sp = head $ _ptTrail bt
|
||||
ep = sp +.+ _ptVel bt
|
||||
piercer = (aGenBulAt (Just cid) p (_ptVel bt) (_btDrag bt)
|
||||
piercer = (aBulAt Nothing id (Just (_ptColor bt)) (Just cid) p (_ptVel bt) (_btDrag bt)
|
||||
(_ptHitEff bt) (_ptWidth bt)
|
||||
) {_ptTimer = _ptTimer bt - 1}
|
||||
{- | Heavy bullet effects when hitting creature:
|
||||
@@ -123,7 +123,7 @@ bulBounceWall bt p wl = damageWall (Blunt 50 sp p ep) wl
|
||||
ep = sp +.+ _ptVel bt
|
||||
sp = head $ _ptTrail bt
|
||||
pOut = p +.+ squashNormalizeV (sp -.- p)
|
||||
bouncer = (aGenBulAt Nothing pOut reflectVel (_btDrag bt) (_ptHitEff bt) (_ptWidth bt)
|
||||
bouncer = (aBulAt Nothing id (Just (_ptColor bt)) Nothing pOut reflectVel (_btDrag bt) (_ptHitEff bt) (_ptWidth bt)
|
||||
) {_ptTimer = _ptTimer bt - 1}
|
||||
reflectVel = reflVelWall wl (_ptVel bt)
|
||||
-- the hack is to get around the fact that the particles list gets reset after
|
||||
|
||||
Reference in New Issue
Block a user