Refactor
This commit is contained in:
@@ -89,13 +89,6 @@ mvGenBullet' w bt
|
||||
$ set btTimer' (t-1) bt
|
||||
)
|
||||
| otherwise = hiteff bt (thingsHitExceptCr mcr p (p +.+ vel) w) w
|
||||
-- case thingsHitExceptCr mcr p (p +.+ vel) w of
|
||||
-- [] -> (w, Just $ set btPassThrough' Nothing
|
||||
-- $ set btTrail' (p +.+ vel :p:ps)
|
||||
-- $ set ptPict' (bulLine col wth (p +.+ vel:p:ps))
|
||||
-- $ set btTimer' (t-1) bt
|
||||
-- )
|
||||
-- hits -> hiteff bt hits w
|
||||
where mcr = _btPassThrough' bt
|
||||
col = _btColor' bt
|
||||
(p:ps) = _btTrail' bt
|
||||
|
||||
@@ -18,13 +18,13 @@ makeSmokeCloud pos w = w & clouds %~ IM.insert i theCloud
|
||||
, _clPos = pos
|
||||
, _clVel = (0,0)
|
||||
, _clPict = fadeOutPict (-0.5)
|
||||
, _clRad = 10
|
||||
, _clRad = 5
|
||||
, _clTimer = 200
|
||||
, _clEffect = const id
|
||||
}
|
||||
|
||||
fadeOutPict :: Float -> Cloud -> Picture
|
||||
fadeOutPict dpth cl = setLayer 2 . setDepth dpth . color (withAlpha a $ greyN 0.5) $ circleSolid (2 * _clRad cl)
|
||||
fadeOutPict dpth cl = setLayer 2 . setDepth dpth . color (withAlpha a $ greyN 0.5) $ circleSolid (4 * _clRad cl)
|
||||
where a = fromIntegral (_clTimer cl) / 200
|
||||
|
||||
makeFlamerSmoke :: Point2 -> World -> World
|
||||
|
||||
Reference in New Issue
Block a user