fix debug renderings

This commit is contained in:
2022-08-13 15:25:13 +00:00
parent 83a2694e80
commit 09c360dc81

View File

@@ -42,17 +42,17 @@
(unless cameraBounds (unless cameraBounds
(set cameraBounds (new FlxSprite)) (set cameraBounds (new FlxSprite))
(set cameraBounds.cameras [pieceCamera]) (set cameraBounds.cameras [pieceCamera])
(add cameraBounds))
(let [b (pieceCamera.getScrollBounds)] (let [b (pieceCamera.getScrollBounds)]
(set cameraBounds.x b.x) (set cameraBounds.x b.x)
(set cameraBounds.y b.y) (set cameraBounds.y b.y)
(cameraBounds.makeGraphic (Std.int b.width) (Std.int b.height) FlxColor.TRANSPARENT true) (cameraBounds.makeGraphic (Std.int b.width) (Std.int b.height) FlxColor.TRANSPARENT true)
(cameraBounds.drawRect 0 0 b.width b.height FlxColor.TRANSPARENT (object color FlxColor.LIME thickness 5))) (cameraBounds.drawRect 0 0 b.width b.height FlxColor.TRANSPARENT (object color FlxColor.LIME thickness 5)))
(add cameraBounds))
(doFor s rewardSprites (doFor s rewardSprites
(s.drawCircle s.origin.x s.origin.y 5 FlxColor.LIME) (s.drawCircle s.origin.x s.origin.y 5 FlxColor.LIME)
// Uncomment for debugging match zones: // Uncomment for debugging match zones:
**(let [matchZones [(matchZoneLeft s) (matchZoneRight s)(matchZoneUp s)(matchZoneDown s)]] (let [matchZones [(matchZoneLeft s) (matchZoneRight s)(matchZoneUp s)(matchZoneDown s)]]
(doFor z matchZones (doFor z matchZones
(unless z.isEmpty (unless z.isEmpty
(FlxSpriteUtil.drawRect cameraBounds (- z.x cameraBounds.x) (- z.y cameraBounds.y) z.width z.height FlxColor.TRANSPARENT (object thickness 1 color FlxColor.RED)))))))) (FlxSpriteUtil.drawRect cameraBounds (- z.x cameraBounds.x) (- z.y cameraBounds.y) z.width z.height FlxColor.TRANSPARENT (object thickness 1 color FlxColor.RED))))))))