Cleanup module pathing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
module Dodge.RadarSweep.Draw where
|
||||
import Dodge.Data.Object
|
||||
|
||||
import Dodge.Data.RadarSweep
|
||||
import Geometry
|
||||
import Picture
|
||||
@@ -10,18 +10,20 @@ drawRadarSweep pt = setLayer DebugLayer $ pictures sweepPics
|
||||
col = rsObjectColor $ _rsObject pt
|
||||
p = _rsPos pt
|
||||
r = _rsRad pt
|
||||
sweepPics = [colHelper 0.1 $ uncurryV translate p $ thickCircle r 15
|
||||
,colHelper 0.06 $ uncurryV translate p $ thickCircle (r-5) 5
|
||||
,colHelper 0.03 $ uncurryV translate p $ thickCircle (r-10) 5
|
||||
]
|
||||
sweepPics =
|
||||
[ colHelper 0.1 $ uncurryV translate p $ thickCircle r 15
|
||||
, colHelper 0.06 $ uncurryV translate p $ thickCircle (r -5) 5
|
||||
, colHelper 0.03 $ uncurryV translate p $ thickCircle (r -10) 5
|
||||
]
|
||||
colHelper y = color (withAlpha (y * globalAlpha) col)
|
||||
globalAlpha | x > 10 = 1
|
||||
| otherwise = fromIntegral x / 10
|
||||
globalAlpha
|
||||
| x > 10 = 1
|
||||
| otherwise = fromIntegral x / 10
|
||||
x = _rsTimer pt
|
||||
|
||||
rsObjectColor :: ObjectType -> Color
|
||||
rsObjectColor ob = case ob of
|
||||
ObWall -> red
|
||||
ObCreature -> green
|
||||
ObItem -> blue
|
||||
ObItem -> blue
|
||||
_ -> yellow
|
||||
|
||||
Reference in New Issue
Block a user