allow ignoring cameras in sprite log
This commit is contained in:
@@ -86,6 +86,7 @@
|
|||||||
(var &mut _idx 0)
|
(var &mut _idx 0)
|
||||||
(var &mut doPrint true)
|
(var &mut doPrint true)
|
||||||
(var :Map<flixel.FlxBasic,Bool> ignoreObjects (new Map))
|
(var :Map<flixel.FlxBasic,Bool> ignoreObjects (new Map))
|
||||||
|
(var :Map<flixel.FlxCamera,Bool> ignoreCameras (new Map))
|
||||||
(function :String logSprites [&opt :flixel.FlxCamera _camera :FlxGroup group :String tab :StringBuf buf]
|
(function :String logSprites [&opt :flixel.FlxCamera _camera :FlxGroup group :String tab :StringBuf buf]
|
||||||
(unless buf
|
(unless buf
|
||||||
(set buf (new StringBuf)))
|
(set buf (new StringBuf)))
|
||||||
@@ -98,10 +99,11 @@
|
|||||||
(_print "###############")
|
(_print "###############")
|
||||||
(let [cameras (enumerate (filter FlxG.cameras.list))]
|
(let [cameras (enumerate (filter FlxG.cameras.list))]
|
||||||
(doFor [idx camera] cameras
|
(doFor [idx camera] cameras
|
||||||
|
(unless (ignoreCameras.exists camera)
|
||||||
(_print "Camera #${idx} (${camera.x}, ${camera.y}, ${camera.width}x${camera.height})")
|
(_print "Camera #${idx} (${camera.x}, ${camera.y}, ${camera.width}x${camera.height})")
|
||||||
(_print "bgColor: ${camera.bgColor}")
|
(_print "bgColor: ${camera.bgColor}")
|
||||||
(_print "--------------")
|
(_print "--------------")
|
||||||
(logSprites camera null "" buf))
|
(logSprites camera null "" buf)))
|
||||||
(return (buf.toString))))
|
(return (buf.toString))))
|
||||||
(unless group
|
(unless group
|
||||||
(set _idx 0)
|
(set _idx 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user