Reify shockwaves

This commit is contained in:
2022-07-24 00:20:28 +01:00
parent 97174535d8
commit 5b9e9968f3
17 changed files with 197 additions and 166 deletions
+11 -2
View File
@@ -5,17 +5,26 @@ module Dodge.Data.Laser
import Color
import Geometry.Data
import Control.Lens
data LaserType = DamageLaser {_laserTypeDamage :: Int}
| TargetLaser
deriving (Eq,Ord,Show,Read)
data LaserStart = LaserStart
{ _lpDamage :: Int
, _lpPhaseV :: Float
{ _lpPhaseV :: Float
, _lpPos :: Point2
, _lpDir :: Float
, _lpColor :: Color
, _lpType :: LaserType
}
deriving (Eq,Ord,Show,Read)
data Laser = Laser
{ _laColor :: Color
, _laPoints :: [Point2]
, _laType :: LaserType
}
deriving (Eq,Ord,Show,Read)
makeLenses ''Laser
makeLenses ''LaserStart
makeLenses ''LaserType
+22
View File
@@ -0,0 +1,22 @@
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE StrictData #-}
module Dodge.Data.Shockwave
where
import Color
import Geometry.Data
import Control.Lens
data ShockwaveDirection = OutwardShockwave | InwardShockwave
deriving (Eq,Ord,Show,Read)
data Shockwave = Shockwave
{ _swColor :: Color
, _swDirection :: ShockwaveDirection
, _swInvulnerableCrs :: [Int]
, _swPos :: Point2
, _swRad :: Float
, _swDam :: Int
, _swPush :: Float
, _swMaxTime :: Int
, _swTimer :: Int
}
deriving (Eq,Ord,Show,Read)
makeLenses ''Shockwave