Move toward adding multiple equipable items that are not directly usable

This commit is contained in:
2021-12-08 17:09:24 +00:00
parent 9f6e5af991
commit a9139db0a8
22 changed files with 260 additions and 137 deletions
+4 -5
View File
@@ -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,)