30 lines
640 B
Haskell
30 lines
640 B
Haskell
{-# LANGUAGE StrictData #-}
|
|
{-# LANGUAGE TemplateHaskell #-}
|
|
|
|
module Dodge.Data.EnergyBall where
|
|
|
|
import Color
|
|
import Control.Lens
|
|
import Data.Aeson
|
|
import Data.Aeson.TH
|
|
import Dodge.Data.Damage.Type
|
|
import Geometry.Data
|
|
import TH.Derive
|
|
import Data.Store
|
|
|
|
data EnergyBall = EnergyBall
|
|
{ _ebVel :: Point2
|
|
, _ebColor :: Color
|
|
, _ebPos :: Point2
|
|
, _ebWidth :: Float
|
|
, _ebTimer :: Int
|
|
, _ebEff :: (DamageType, Int)
|
|
, _ebZ :: Float
|
|
, _ebRot :: Float
|
|
}
|
|
deriving (Eq, Ord, Show, Read)
|
|
|
|
makeLenses ''EnergyBall
|
|
deriveJSON defaultOptions ''EnergyBall
|
|
$($(derive [d| instance Deriving (Store EnergyBall) |]))
|