Simplify sparks

This commit is contained in:
2025-06-07 10:07:16 +01:00
parent 7bee1549bf
commit b4bdfbf2c3
13 changed files with 101 additions and 102 deletions
+1 -2
View File
@@ -20,8 +20,7 @@ data Sensor
= DamageSensor
{ _sensToggle :: Bool
, _sensAmount :: Int
, -- , _sensType :: DamageType
_sensType :: SensorType
, _sensType :: SensorType
, _sensDraw :: (PaletteColor, DecorationShape)
, _sensThreshold :: Int
}
+6 -5
View File
@@ -5,22 +5,23 @@
module Dodge.Data.Spark where
import Color
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
import Dodge.Data.Damage.Type
--import Dodge.Data.Damage.Type
import Geometry.Data
data Spark = Spark
{ _skVel :: Point2
, _skColor :: Color
, _skPos :: Point2
, _skOldPos :: Point2
, _skWidth :: Float
, _skDamageType :: DamageType
, _skType :: SparkType
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data SparkType = ElectricSpark | FireSpark | NormalSpark
deriving (Eq, Ord, Show, Read) --Generic, Flat)
makeLenses ''Spark
deriveJSON defaultOptions ''SparkType
deriveJSON defaultOptions ''Spark