Remove force fields, cleanup

This commit is contained in:
2021-10-31 16:27:41 +00:00
parent 74a4267393
commit e3a8417f07
11 changed files with 46 additions and 105 deletions
+7 -12
View File
@@ -1,8 +1,7 @@
{-
Bullet update.
-}
{- Bullet update. -}
module Dodge.Particle.Bullet.Update
where
( mvGenBullet
) where
import Dodge.Data
--import Dodge.Base
import Dodge.WorldEvent.ThingsHit
@@ -10,20 +9,16 @@ import Dodge.WorldEvent.ThingsHit
import Geometry
import Control.Lens
--import Data.Maybe
--import Data.List
--import Data.Bifunctor
--import qualified Data.IntMap.Strict as IM
{-
Update for a generic bullet.
-}
mvGenBullet :: World -> Particle -> (World, Maybe Particle)
mvGenBullet w bt
| t <= 0 = (w, Nothing)
| t < 4 = (w, Just $ set btPassThrough' Nothing
$ set btTrail' (p:p:ps)
$ set btTimer' (t-1) bt
| t < 4 = (w, Just $ bt
& btPassThrough' .~ Nothing
& btTrail' .~ (p:p:ps)
& btTimer' -~ 1
)
| otherwise = hiteff bt (thingsHitExceptCr mcr p (p +.+ vel) w) w
where