allow ignoring some objects in the log

This commit is contained in:
2023-09-18 15:38:46 -06:00
parent b04b67b604
commit 851a61fa5a

View File

@@ -85,6 +85,7 @@
(var &mut _idx 0)
(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]
(unless buf
(set buf (new StringBuf)))
@@ -109,6 +110,7 @@
(group.forEach
->:Void obj
(cond
((ignoreObjects.exists obj) null)
((let [cameras (or obj.cameras (Reflect.field FlxG.cameras "defaults"))]
(cameras.contains _camera))