Refactor, try to limit dependencies

This commit is contained in:
2022-07-28 00:59:56 +01:00
parent 8aa5c17ab9
commit 160560af5f
418 changed files with 15104 additions and 13342 deletions
+13 -9
View File
@@ -1,5 +1,5 @@
module Dodge.TractorBeam.Draw
where
module Dodge.TractorBeam.Draw where
import Dodge.Data.TractorBeam
import Geometry
import Picture
@@ -8,13 +8,17 @@ drawTractorBeam :: TractorBeam -> Picture
drawTractorBeam = tractorSPic
tractorSPic :: TractorBeam -> Picture
tractorSPic pj = setLayer BloomNoZWrite $ setDepth 20 $ color (withAlpha 0.5 col) $ polygon
[ spos -- not sure if this is anticlockwise...
, spos +.+ size *.* (d +.+ n)
, xpos +.+ size *.* n
, xpos -.- size *.* n
, spos +.+ size *.* (d -.- n)
]
tractorSPic pj =
setLayer BloomNoZWrite $
setDepth 20 $
color (withAlpha 0.5 col) $
polygon
[ spos -- not sure if this is anticlockwise...
, spos +.+ size *.* (d +.+ n)
, xpos +.+ size *.* n
, xpos -.- size *.* n
, spos +.+ size *.* (d -.- n)
]
where
size = fromIntegral (_tbTime pj)
spos = _tbPos pj