FlixelDebugUtil
View sourceclass
org.flixelgdx.util.FlixelDebugUtil
Utility methods used by the debug overlay for recursively traversing the state's object tree (counting active members, iterating FlixelDebugDrawable instances for bounding-box drawing, etc.).
Recursion descends into any member that implements FlixelGroupable, which covers FlixelBasicGroup, FlixelSpriteGroup, and nested FlixelGroup instances whose elements are IFlixelBasic.
Methods
countActiveMembers()
Recursively counts all active members in the current state's object tree. A member is counted when IFlixelBasic.isExists() is true.
Returns: The number of active members, or 0 if no state is loaded.
forEachDebugDrawable(Consumer<FlixelDebugDrawable>)
Iterates all visible FlixelDebugDrawable instances in the current state's object tree (where IFlixelBasic.isExists() and FlixelVisible.isVisible() are both true), invoking the callback for each one. No intermediate collection is created.
Parameters:
| Name | Description |
|---|---|
callback | Invoked once per visible FlixelDebugDrawable. |