Move sparks into dedicated datatype
This commit is contained in:
+3
-10
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user