Drag[en]gine Script Module DragonScript
1.23
|
Debug log thinking elements. More...
Classes | |
class | LogThinkerVisitor |
Visitor printing thinkers. More... | |
Public Member Functions | |
Console | getConsole () |
Console to use. More... | |
String | getLogPrefix () |
Prefix prepended to logs written. More... | |
ElementVisitor | getVisitor () |
Visitor to apply to thinkers. More... | |
void | logThinker (Element element) |
Print thinker. More... | |
void | logThinkers (GameWorld gameWorld) |
Print thinking elements and behaviors in game world. More... | |
DebugLogThinkers | new () |
Create debug instance using BaseGameApp. More... | |
DebugLogThinkers | new (Console console) |
Create debug instance. More... | |
void | setConsole (Console console) |
Set console to use. More... | |
void | setLogPrefix (String prefix) |
Set prefix prepended to logs written. More... | |
void | setVisitor (ElementVisitor visitor) |
Set visitor to apply to thinkers. More... | |
Debug log thinking elements.
Prints all thinkers registered in a GameWorld instance. For each thinker of type BehaviorElement also prints all behavior instances with requiresThinking() returning true.
This debug class can be used to find potential performance problems by locating elements and behaviors in a game world that are thinking although they should be doing nothing instead.
Console Dragengine.Debugging.DebugLogThinkers.getConsole | ( | ) |
Console to use.
String Dragengine.Debugging.DebugLogThinkers.getLogPrefix | ( | ) |
Prefix prepended to logs written.
ElementVisitor Dragengine.Debugging.DebugLogThinkers.getVisitor | ( | ) |
Visitor to apply to thinkers.
void Dragengine.Debugging.DebugLogThinkers.logThinker | ( | Element | element | ) |
Print thinker.
Applies visitor to thinker.
void Dragengine.Debugging.DebugLogThinkers.logThinkers | ( | GameWorld | gameWorld | ) |
Print thinking elements and behaviors in game world.
DebugLogThinkers Dragengine.Debugging.DebugLogThinkers.new | ( | ) |
Create debug instance using BaseGameApp.
DebugLogThinkers Dragengine.Debugging.DebugLogThinkers.new | ( | Console | console | ) |
Create debug instance.
void Dragengine.Debugging.DebugLogThinkers.setConsole | ( | Console | console | ) |
Set console to use.
void Dragengine.Debugging.DebugLogThinkers.setLogPrefix | ( | String | prefix | ) |
Set prefix prepended to logs written.
void Dragengine.Debugging.DebugLogThinkers.setVisitor | ( | ElementVisitor | visitor | ) |
Set visitor to apply to thinkers.