Add Read instances

This commit is contained in:
2022-07-22 01:06:35 +01:00
parent d4e5b02874
commit 4c5218c633
44 changed files with 209 additions and 126 deletions
+18
View File
@@ -0,0 +1,18 @@
module Dodge.Wall.Draw where
import Dodge.Data.Wall
import ShapePicture
import Picture.Base
drawWall :: WallDraw -> Wall -> SPic
drawWall wd = case wd of
DrawForceField -> drawForceField
drawForceField :: Wall -> SPic
drawForceField wl = (mempty
, setLayer BloomLayer
. setDepth 20
. color (_wlColor wl)
$ thickLine 5 [a,b]
)
where
(a,b) = _wlLine wl
+1 -12
View File
@@ -2,13 +2,11 @@ module Dodge.Wall.ForceField where
import Dodge.Data
import Dodge.Default.Wall
import Color
import Picture
import ShapePicture
forceField :: Wall
forceField = defaultWall
{_wlColor = orange
,_wlOpacity = DrawnWall drawForceField
,_wlOpacity = DrawnWall DrawForceField
,_wlPathable = True
,_wlWalkable = True
,_wlFireThrough = True
@@ -18,12 +16,3 @@ forceField = defaultWall
,_wlStructure = StandaloneWall
}
drawForceField :: Wall -> SPic
drawForceField wl = (mempty
, setLayer BloomLayer
. setDepth 20
. color (_wlColor wl)
$ thickLine 5 [a,b]
)
where
(a,b) = _wlLine wl