Improve forcefield visuals
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
module Dodge.Debug.Picture where
|
||||
import Dodge.Data
|
||||
import Dodge.Base.Window
|
||||
import Dodge.Base.Collide
|
||||
import Geometry
|
||||
import Picture
|
||||
|
||||
@@ -46,7 +47,7 @@ pointOnScreen cfig w p = pointInPolygon p . reverse $ screenPolygon cfig w
|
||||
|
||||
drawWallFace :: Configuration -> World -> Wall -> Picture
|
||||
drawWallFace cfig w wall
|
||||
| isRHS sightFrom x y || _wlOpacity wall /= Opaque = blank
|
||||
| isRHS sightFrom x y || not (wlIsOpaque wall) = blank
|
||||
| otherwise = setDepth (-1) . color (withAlpha 0 black) . polygon $ points
|
||||
where
|
||||
(x,y) = _wlLine wall
|
||||
|
||||
Reference in New Issue
Block a user