More strictifiiiying
This commit is contained in:
@@ -134,8 +134,8 @@ aRocketWithItemParams it cr w = over projectiles (IM.insert i theShell) w
|
||||
theShell = defaultShell
|
||||
{ _pjPos = pos
|
||||
, _pjStartPos = pos
|
||||
, _pjVel = rotateV dir (1,0)
|
||||
, _pjAcc = rotateV dir (3,0)
|
||||
, _pjVel = rotateV dir (V2 1 0)
|
||||
, _pjAcc = rotateV dir (V2 3 0)
|
||||
, _pjDraw = _amPjDraw am
|
||||
, _pjID = i
|
||||
, _pjUpdate = \pj -> ammoMvs pj . decTimMvVel pj . moveShell pj
|
||||
@@ -173,9 +173,9 @@ reduceSpinBy :: Float -> Projectile -> World -> World
|
||||
reduceSpinBy x pj = projectiles . ix (_pjID pj) . pjSpin *~ x
|
||||
|
||||
shellPic :: Projectile -> Picture
|
||||
shellPic pj = setDepth 20 . uncurry translate pos $ rotate (argV accel) basePic
|
||||
shellPic pj = setDepth 20 . uncurryV translate pos $ rotate (argV accel) basePic
|
||||
where
|
||||
basePic = color black $ polygon [(-6,4),(-6,-4),(6,-4),(8,0),(6,4)]
|
||||
basePic = color black $ polygon $ map toV2 [(-6,4),(-6,-4),(6,-4),(8,0),(6,4)]
|
||||
accel = _pjAcc pj
|
||||
pos = _pjPos pj
|
||||
|
||||
|
||||
Reference in New Issue
Block a user