Move sparks into dedicated datatype

This commit is contained in:
2022-07-18 12:15:05 +01:00
parent 13f2255ba7
commit 5495d33389
16 changed files with 99 additions and 104 deletions
+3 -10
View File
@@ -10,6 +10,7 @@ circular imports are probably not a good idea.
{-# LANGUAGE DerivingStrategies #-}
module Dodge.Data
( module Dodge.Data
, module Dodge.Data.Spark
, module Dodge.Data.Bullet
, module Dodge.Data.Door
, module Dodge.Data.Item
@@ -47,6 +48,7 @@ module Dodge.Data
, module Dodge.Data.RadarBlip
, module Dodge.Data.PathGraph
) where
import Dodge.Data.Spark
import Dodge.Data.Bullet
import Dodge.Data.Door
import Dodge.Data.Item
@@ -147,6 +149,7 @@ data World = World
, _bullets :: [Bullet]
, _instantParticles :: [Particle]
, _particles :: [Particle]
, _sparks :: [Spark]
, _radarBlips :: [RadarBlip]
, _flares :: [Flare]
, _newBeams :: WorldBeams
@@ -544,16 +547,6 @@ data Particle
, _ptPhaseV :: Float
, _ptPoints :: [Point2]
}
| PtSpark
{ _ptUpdate :: World -> Particle -> (World, Maybe Particle)
, _ptVel :: Point2
, _ptDrag :: Float
, _ptColor :: Color
, _ptTrail :: [Point2]
, _ptWidth :: Float
, _ptTimer :: Int
, _ptHitEff :: HitEffect
}
| PtTeslaArc
{ _ptUpdate :: World -> Particle -> (World, Maybe Particle)
, _ptPoints :: [Point2]