Move toward adding multiple equipable items that are not directly usable
This commit is contained in:
@@ -12,14 +12,13 @@ import Geometry
|
||||
|
||||
import Data.Bifunctor
|
||||
import Control.Lens
|
||||
{-
|
||||
Update for a generic bullet.
|
||||
-}
|
||||
{- Update for a generic bullet. -}
|
||||
mvBullet :: World -> Particle -> (World, Maybe Particle)
|
||||
mvBullet w bt
|
||||
mvBullet w bt'
|
||||
| t <= 0 || magV (_btVel' bt) < 1 = wAnd Nothing
|
||||
| otherwise = second (fmap dodrag) $ hiteff bt (thingsHitExceptCr mcr p (p +.+ vel) w) w
|
||||
where
|
||||
where
|
||||
bt = foldr (\mg b -> _mgField mg mg b) bt' $ _magnets w
|
||||
dodrag = btVel' %~ (drag *.*)
|
||||
drag = _btDrag bt
|
||||
wAnd = (w,)
|
||||
|
||||
Reference in New Issue
Block a user