Remove instantBullets
This commit is contained in:
+2
-3
@@ -44,7 +44,6 @@ doMagnetBuBu mg bu = if isclose
|
||||
MagnetAttract -> bu & buVel %~ vecTurnTo (10 * pi / (d+40)) bpos mpos
|
||||
MagnetRepulse -> bu & buVel %~ vecTurnTo (10 * pi / (d+40)) bpos (2*bpos - mpos)
|
||||
else bu
|
||||
|
||||
where
|
||||
bvel = bu ^. buVel
|
||||
mpos = mg ^. mgPos
|
||||
@@ -126,7 +125,7 @@ useBulletPayload bu = case _buPayload bu of
|
||||
BulBall FlashBall -> Just makeFlashBall
|
||||
|
||||
makeFragBullets :: Point2 -> World -> World
|
||||
makeFragBullets p w = w & cWorld . lWorld . instantBullets .++~ bus
|
||||
makeFragBullets p w = w & cWorld . lWorld . bullets .++~ bus
|
||||
where
|
||||
bus = zipWith f (take 10 as) (take 10 ss)
|
||||
as = randomRs (0, 2 * pi) $ _randGen w
|
||||
@@ -141,7 +140,7 @@ makeFragBullets p w = w & cWorld . lWorld . instantBullets .++~ bus
|
||||
]
|
||||
|
||||
makeFlak :: Bullet -> Point2 -> World -> World
|
||||
makeFlak bu _ w = w & cWorld . lWorld . instantBullets .++~ [f x | x <- xs]
|
||||
makeFlak bu _ w = w & cWorld . lWorld . bullets .++~ [f x | x <- xs]
|
||||
where
|
||||
s = min 10 (0.5 * magV (_buVel bu))
|
||||
xs = take 5 $ randomRs (-s,s) $ _randGen w
|
||||
|
||||
Reference in New Issue
Block a user