Add Read instances
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user