less crash-prone debug layer

This commit is contained in:
2022-08-14 21:24:40 +00:00
parent 1e8b13551c
commit 9aebeaab05

View File

@@ -29,4 +29,9 @@ class DebugLayer extends FlxTypedGroup<FlxSprite> {
public static function mg(s:FlxSprite, Width:Float, Height:Float):FlxSprite {
return s.makeGraphic(Math.ceil(Width), Math.ceil(Height), FlxColor.TRANSPARENT, true);
}
public override function clear() {
forEach((s)->{s.destroy();});
super.clear();
}
}