Steps towards making clouds list based
This commit is contained in:
@@ -10,17 +10,16 @@ import qualified IntMapHelp as IM
|
||||
import Control.Lens
|
||||
|
||||
makeCloudAt :: Float -> Int -> (Cloud -> Picture) -> Point2 -> World -> World
|
||||
makeCloudAt rad t drawFunc p w = w & clouds %~ IM.insert i theCloud
|
||||
makeCloudAt rad t drawFunc p w = w & clouds %~ (theCloud :)
|
||||
where
|
||||
i = IM.newKey $ _clouds w
|
||||
theCloud = Cloud
|
||||
{ _clID = i
|
||||
, _clPos = p
|
||||
{ _clPos = p
|
||||
, _clVel = (0,0)
|
||||
, _clPict = drawFunc
|
||||
, _clRad = rad
|
||||
, _clTimer = t
|
||||
, _clEffect = const id
|
||||
, _clType = SmokeCloud
|
||||
--, _clEffect = const id
|
||||
}
|
||||
|
||||
drawCloudWith :: Float -> Float -> Color -> Cloud -> Picture
|
||||
|
||||
Reference in New Issue
Block a user