Add Binary instances

This commit is contained in:
2022-08-21 10:58:19 +01:00
parent 386a2b4732
commit 1ce7d4a72d
95 changed files with 345 additions and 3 deletions
+3
View File
@@ -5,6 +5,7 @@
module Dodge.Data.Shockwave where
import Data.Binary
import Flat
import Color
import Control.Lens
@@ -14,6 +15,7 @@ import Geometry.Data
data ShockwaveDirection = OutwardShockwave | InwardShockwave
deriving (Eq, Ord, Show, Read, Generic, Flat)
instance Binary ShockwaveDirection
data Shockwave = Shockwave
{ _swColor :: Color
@@ -27,6 +29,7 @@ data Shockwave = Shockwave
, _swTimer :: Int
}
deriving (Eq, Ord, Show, Read, Generic, Flat)
instance Binary Shockwave
makeLenses ''Shockwave
deriveJSON defaultOptions ''ShockwaveDirection