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
