31 lines
689 B
Haskell
31 lines
689 B
Haskell
{-# LANGUAGE DeriveGeneric #-}
|
|
{-# LANGUAGE DeriveAnyClass #-}
|
|
{-# LANGUAGE StrictData #-}
|
|
{-# LANGUAGE TemplateHaskell #-}
|
|
|
|
module Dodge.Data.Corpse where
|
|
|
|
import Flat
|
|
import LinearHelp ()
|
|
import Control.Lens
|
|
import Data.Aeson
|
|
import Data.Aeson.TH
|
|
import Geometry.Data
|
|
import ShapePicture.Data
|
|
|
|
data CorpseResurrection = NoResurrection
|
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
|
|
|
data Corpse = Corpse
|
|
{ _cpID :: Int
|
|
, _cpPos :: Point2
|
|
, _cpDir :: Float
|
|
, _cpSPic :: SPic
|
|
, _cpRes :: CorpseResurrection
|
|
}
|
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
|
|
|
makeLenses ''Corpse
|
|
deriveJSON defaultOptions ''CorpseResurrection
|
|
deriveJSON defaultOptions ''Corpse
|