Refactor, try to limit dependencies
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user