Cleanup module pathing

This commit is contained in:
2022-07-27 17:37:18 +01:00
parent b52adddd5d
commit 8aa5c17ab9
27 changed files with 484 additions and 517 deletions
+10 -8
View File
@@ -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