Refactor, add bullet modules and weapon effect modifiers
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user