Rename (indexed) particles to projectiles
This commit is contained in:
@@ -132,7 +132,7 @@ bulHitWall' bt p x w = damageBlocks x
|
||||
pOut = p +.+ safeNormalizeV (sp -.- p)
|
||||
(colID,g) = randomR (0,11) $ _randGen w
|
||||
(a, _) = randomR (-0.1,0.1) $ _randGen w
|
||||
spid = newKey $ _particles w
|
||||
spid = newKey $ _projectiles w
|
||||
reflectDir wall = a + (argV $ reflectIn
|
||||
(_wlLine wall !! 1 -.- _wlLine wall !! 0)
|
||||
(p -.- sp)
|
||||
@@ -160,7 +160,7 @@ bulBounceWall' bt p wl w = damageBlocks wl
|
||||
reflectVel = (reflectIn wallV (_btVel' bt))
|
||||
addBouncer = (.) (over particles' ((:) bouncer))
|
||||
-- the hack is to get around the fact that the particles' list gets reset after
|
||||
-- all particles in it are checked, so we cannot add to it as we accumulate over
|
||||
-- all projectiles in it are checked, so we cannot add to it as we accumulate over
|
||||
-- this list
|
||||
|
||||
bulIncWall' :: Particle' -> Point2 -> Wall -> World -> World
|
||||
@@ -181,7 +181,6 @@ bulIncWall' bt p wl w = damageBlocks wl
|
||||
bulConWall' :: Particle' -> Point2 -> Wall -> World -> World
|
||||
bulConWall' bt p wl w = damageBlocks wl
|
||||
$ mkwave
|
||||
-- yay for hack -- should have used this before? or never?
|
||||
w
|
||||
where sp = head $ _btTrail' bt
|
||||
pOut = p +.+ safeNormalizeV (sp -.- p)
|
||||
@@ -199,7 +198,7 @@ hvBulHitWall' bt p x w = damageBlocks x
|
||||
where sp = head $ _btTrail' bt
|
||||
pOut = p +.+ safeNormalizeV (sp -.- p)
|
||||
(a, g) = randomR (-0.1,0.1) $ _randGen w
|
||||
spid = newKey $ _particles w
|
||||
spid = newKey $ _projectiles w
|
||||
reflectDir wall = a + (argV $ reflectIn
|
||||
(_wlLine wall !! 1 -.- _wlLine wall !! 0)
|
||||
(p -.- sp)
|
||||
|
||||
Reference in New Issue
Block a user