Flash refactor

This commit is contained in:
jgk
2021-03-24 20:28:31 +01:00
parent 7c9cba9ee1
commit 7fd49d9b41
3 changed files with 26 additions and 18 deletions
+11 -2
View File
@@ -427,11 +427,20 @@ data ItemIdentity
| PoisonSprayer
deriving (Eq,Show,Ord,Enum)
data Particle' =
Particle'
data Particle'
= Particle'
{ _ptDraw :: Particle' -> Picture
, _ptUpdate' :: World -> Particle' -> (World, Maybe Particle')
}
| GlareLine
{ _ptDraw :: Particle' -> Picture
, _ptUpdate' :: World -> Particle' -> (World, Maybe Particle')
, _glareTimer :: Int
, _glareLength :: Float
, _glareWidth :: Float
, _glareColor :: Color
, _glareLine :: (Point2,Point2)
}
| Bul' { _ptDraw :: Particle' -> Picture
, _ptUpdate' :: World -> Particle' -> (World, Maybe Particle')
, _btVel' :: Point2