28 lines
555 B
Haskell
28 lines
555 B
Haskell
{-# LANGUAGE StrictData #-}
|
|
{-# LANGUAGE TemplateHaskell #-}
|
|
|
|
module Dodge.Data.Flame where
|
|
|
|
import Color
|
|
import Control.Lens
|
|
import Data.Aeson
|
|
import Data.Aeson.TH
|
|
import Geometry.Data
|
|
import TH.Derive
|
|
import Data.Store
|
|
|
|
data Flame = Flame
|
|
{ _flVel :: Point2
|
|
, _flColor :: Color
|
|
, _flPos :: Point2
|
|
, _flWidth :: Float
|
|
, _flTimer :: Int
|
|
, _flZ :: Float
|
|
, _flOriginalVel :: Point2
|
|
}
|
|
deriving (Eq, Ord, Show, Read)
|
|
|
|
makeLenses ''Flame
|
|
deriveJSON defaultOptions ''Flame
|
|
$($(derive [d| instance Deriving (Store Flame) |]))
|