Refactor, try to limit dependencies
This commit is contained in:
@@ -1,25 +1,26 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.EnergyBall where
|
||||
import GHC.Generics
|
||||
import Data.Aeson
|
||||
import Geometry.Data
|
||||
|
||||
import Color
|
||||
import Dodge.Data.Damage.Type
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import Dodge.Data.Damage.Type
|
||||
import Geometry.Data
|
||||
|
||||
data EnergyBall = EnergyBall
|
||||
{ _ebVel :: Point2
|
||||
, _ebColor :: Color
|
||||
{ _ebVel :: Point2
|
||||
, _ebColor :: Color
|
||||
, _ebPos :: Point2
|
||||
, _ebWidth :: Float
|
||||
, _ebWidth :: Float
|
||||
, _ebTimer :: Int
|
||||
, _ebEff :: (DamageType,Int)
|
||||
, _ebEff :: (DamageType, Int)
|
||||
, _ebZ :: Float
|
||||
, _ebRot :: Float
|
||||
}
|
||||
deriving (Eq,Ord,Show,Read,Generic)
|
||||
instance ToJSON EnergyBall where
|
||||
toEncoding = genericToEncoding defaultOptions
|
||||
instance FromJSON EnergyBall
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
|
||||
makeLenses ''EnergyBall
|
||||
deriveJSON defaultOptions ''EnergyBall
|
||||
|
||||
Reference in New Issue
Block a user