allow ignoring some objects in the log
This commit is contained in:
@@ -85,6 +85,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))
|
||||||
(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)))
|
||||||
@@ -109,6 +110,7 @@
|
|||||||
(group.forEach
|
(group.forEach
|
||||||
->:Void obj
|
->:Void obj
|
||||||
(cond
|
(cond
|
||||||
|
((ignoreObjects.exists obj) null)
|
||||||
((let [cameras (or obj.cameras (Reflect.field FlxG.cameras "defaults"))]
|
((let [cameras (or obj.cameras (Reflect.field FlxG.cameras "defaults"))]
|
||||||
(cameras.contains _camera))
|
(cameras.contains _camera))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user