Package buildengine.engine
Class Debug
java.lang.Object
buildengine.engine.Debug
Static class containing debug menu, debug drawing and messages handling.
The Debug menu is drawn on the top-right and drawing
information depending on the mode. It also always draws
the Object.toString()
of the trackers currently
active.
Debug lines are lines drawn to represent certain aspects that are invisible by default (like bounding boxes). These can be regulated in this class.
Debug messages are regulated messages and only show up if debug messages are enabled.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
draw()
Draws the debug window.static void
enable
(int drawMode, boolean debugLines, boolean messages) Enable debugging and set the settingsstatic int
static boolean
static boolean
static void
Put a debug message in the console.static void
Track certain stats in the debug menu.
-
Field Details
-
VISIBLE_COLOR
-
COLLISION_COLOR
-
NO_DRAW
public static final int NO_DRAWDraw nothing- See Also:
-
FPS_ONLY
public static final int FPS_ONLYDraw the fps- See Also:
-
FPS_AND_SCENE
public static final int FPS_AND_SCENEDraw the fps and stage- See Also:
-
-
Method Details
-
enable
public static void enable(int drawMode, boolean debugLines, boolean messages) Enable debugging and set the settings- Parameters:
drawMode
- The items to track on top of the screen. UseNO_DRAW
,FPS_ONLY
orFPS_AND_SCENE
. Debug always draws custom trackers.debugLines
- Enable the debug lines like collision and visibility bounds.messages
-true
- Enable debug messages in the console.false
- Don't use console for debug messages
-
msg
Put a debug message in the console. Only works if debug messages are enabled- Parameters:
s
- the object, of any kind that allowstoString()
. Including string objects.
-
track
Track certain stats in the debug menu.- Parameters:
track
- the strings to track. Make sure you update this list every time it changes.
-
draw
public static void draw()Draws the debug window. This method is called in the Engine class and is not recommended to use outside of it. -
isEnableDrawing
public static boolean isEnableDrawing() -
getDebugDrawMode
public static int getDebugDrawMode() -
isEnableMessages
public static boolean isEnableMessages()
-