FlixelDebugDrawable
View sourceinterface
org.flixelgdx.debug.FlixelDebugDrawable
Interface for objects that can draw a debug bounding box in the FlixelDebugOverlay. Any class that implements this will automatically appear when visual debug drawing is enabled, without being hard-coded into the overlay.
FlixelObject implements this by default, using collision state to pick an appropriate color. Custom objects can implement this interface to provide their own debug visualization.
Methods
getDebugX()
X position of the bounding box in world space.
getDebugY()
Y position of the bounding box in world space.
getDebugWidth()
Width of the bounding box in world pixels.
getDebugHeight()
Height of the bounding box in world pixels.
getDebugDrawX(FlixelCamera)
X position of the debug box in the same world space as FlixelCamera projection during draw (includes scroll-factor / parallax). Defaults to FlixelDebugDrawable.getDebugX().
Parameters:
| Name | Description |
|---|---|
camera | The game camera used for this debug pass. |
getDebugDrawY(FlixelCamera)
Y position of the debug box in the same world space as FlixelCamera projection during draw. Defaults to FlixelDebugDrawable.getDebugY().
Parameters:
| Name | Description |
|---|---|
camera | The game camera used for this debug pass. |
getDebugBoundingBoxColor()
Returns the RGBA color for this object's debug bounding box as a 4-element array: [r, g, b, a]. Implementations should return a cached array rather than allocating every frame.