Add explicit layer datatype
This commit is contained in:
@@ -75,7 +75,7 @@ targetCursor = defaultTargeting
|
||||
targetSimpleDraw :: Int -> Item -> Creature -> World -> Picture
|
||||
targetSimpleDraw _ it _ w = fromMaybe mempty $ do
|
||||
mwp <- it ^? itTargeting . tgPos . _Just
|
||||
return $ setLayer 4 $ color red $ setDepth 50 $ uncurryV translate mwp
|
||||
return $ setLayer TopLayer $ color red $ setDepth 50 $ uncurryV translate mwp
|
||||
$ rotate (_cameraRot w)
|
||||
$ pictures
|
||||
[line [V2 x x, V2 (-x) (-x)]
|
||||
@@ -87,7 +87,7 @@ targetSimpleDraw _ it _ w = fromMaybe mempty $ do
|
||||
targetRBCreatureDraw :: Int -> Item -> Creature -> World -> Picture
|
||||
targetRBCreatureDraw _ it _ w = fromMaybe mempty $ do
|
||||
mwp <- it ^? itTargeting . tgPos . _Just
|
||||
return $ setLayer 5 $ color thecolor $ setDepth 50 $ uncurryV translate mwp
|
||||
return $ setLayer TopLayer $ color thecolor $ setDepth 50 $ uncurryV translate mwp
|
||||
$ rotate (_cameraRot w)
|
||||
$ pictures
|
||||
[line [V2 x x, V2 (-x) (-x)]
|
||||
@@ -146,7 +146,7 @@ targetLaserUpdate it cr w t
|
||||
sp = _crPos cr +.+ 15 *.* unitVectorAtAngle (_crDir cr)
|
||||
ep = sp +.+ 5000 *.* normalizeV (mouseWorldPos w -.- sp)
|
||||
addLaserPic = instantParticles .:~ Particle
|
||||
{ _ptDraw = const $ setLayer 1 $ pictures
|
||||
{ _ptDraw = const $ setLayer BloomNoZWrite $ pictures
|
||||
[ setDepth 19 . color (brightX 0 0.5 col) $ thickLine 5 (sp:ps)
|
||||
, setDepth 19.5 . color (brightX 5 1 col) $ thickLine 1 (sp:ps)
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user