Refactor, add bullet modules and weapon effect modifiers

This commit is contained in:
2021-05-27 02:50:33 +02:00
parent 0187ae6001
commit 346c426b43
13 changed files with 395 additions and 144 deletions
+27
View File
@@ -0,0 +1,27 @@
module Dodge.Item.Weapon.Shell
where
import Dodge.Data
import Geometry.Vector
import Control.Lens
decTimMvVel :: Projectile -> World -> World
decTimMvVel pj = projectiles . ix pjid %~
( (pjTimer -~ 1)
. (pjPos %~ (+.+ vel) )
. (pjAcc %~ rotateV rot )
)
where
rot = _pjSpin pj
vel = _pjVel pj
pjid = _pjID pj
--pjAutoSpin :: Projectile -> World -> World
--pjAutoSpin pj = projectiles . ix pjid %~
-- ( (pjDir -~ 1)
-- . (pjPos %~ (+.+ vel) )
-- . (pjAcc %~ rotateV rot )
-- )
-- where
-- rot = _pjSpin pj
-- vel = _pjVel pj
-- pjid = _pjID pj