Move radar blips into own grouping, work on data-ifying particles
This commit is contained in:
+25
-24
@@ -635,16 +635,17 @@ data BeamType
|
||||
{- Objects without ids.
|
||||
Update themselves, perhaps with side effects. -}
|
||||
data Particle
|
||||
= Particle
|
||||
{ _ptDraw :: Particle -> Picture
|
||||
, _ptUpdate :: World -> Particle -> (World, Maybe Particle)
|
||||
}
|
||||
| RadarCircleParticle
|
||||
-- = Particle
|
||||
-- { _ptDraw :: Particle -> Picture
|
||||
-- , _ptUpdate :: World -> Particle -> (World, Maybe Particle)
|
||||
-- }
|
||||
= RadarCircleParticle
|
||||
{ _ptDraw :: Particle -> Picture
|
||||
, _ptUpdate :: World -> Particle -> (World, Maybe Particle)
|
||||
, _ptTimer :: Int
|
||||
, _ptRad :: Float
|
||||
, _ptPos :: Point2
|
||||
, _ptColor :: Color
|
||||
}
|
||||
| LaserParticle
|
||||
{ _ptDraw :: Particle -> Picture
|
||||
@@ -668,13 +669,13 @@ data Particle
|
||||
, _ptPoints :: [Point2]
|
||||
, _ptColor :: Color
|
||||
}
|
||||
| LinearParticle
|
||||
{ _ptDraw :: Particle -> Picture
|
||||
, _ptUpdate :: World -> Particle -> (World, Maybe Particle)
|
||||
, _ptPoints :: [Point2]
|
||||
, _ptTimer :: Int
|
||||
, _ptColor :: Color
|
||||
}
|
||||
-- | LinearParticle
|
||||
-- { _ptDraw :: Particle -> Picture
|
||||
-- , _ptUpdate :: World -> Particle -> (World, Maybe Particle)
|
||||
-- , _ptPoints :: [Point2]
|
||||
-- , _ptTimer :: Int
|
||||
-- , _ptColor :: Color
|
||||
-- }
|
||||
| BulletPt
|
||||
{ _ptDraw :: Particle -> Picture
|
||||
, _ptUpdate :: World -> Particle -> (World, Maybe Particle)
|
||||
@@ -739,18 +740,18 @@ data Particle
|
||||
, _ptAlpha :: Float
|
||||
, _ptTran3 :: Point3
|
||||
}
|
||||
| PtZ
|
||||
{ _ptDraw :: Particle -> Picture
|
||||
, _ptUpdate :: World -> Particle -> (World, Maybe Particle)
|
||||
, _ptVel :: Point2
|
||||
, _ptColor :: Color
|
||||
, _ptPos :: Point2
|
||||
, _ptCrIgnore :: Maybe Int
|
||||
, _ptWidth :: Float
|
||||
, _ptTimer :: Int
|
||||
, _ptHitEff :: HitEffect
|
||||
, _ptZ :: Float
|
||||
}
|
||||
-- | PtZ
|
||||
-- { _ptDraw :: Particle -> Picture
|
||||
-- , _ptUpdate :: World -> Particle -> (World, Maybe Particle)
|
||||
-- , _ptVel :: Point2
|
||||
-- , _ptColor :: Color
|
||||
-- , _ptPos :: Point2
|
||||
-- , _ptCrIgnore :: Maybe Int
|
||||
-- , _ptWidth :: Float
|
||||
-- , _ptTimer :: Int
|
||||
-- , _ptHitEff :: HitEffect
|
||||
-- , _ptZ :: Float
|
||||
-- }
|
||||
| Shockwave
|
||||
{ _ptDraw :: Particle -> Picture
|
||||
, _ptUpdate :: World -> Particle -> (World, Maybe Particle)
|
||||
|
||||
Reference in New Issue
Block a user