|
Drag[en]gine Script Module DragonScript 1.35
|
Debug log thinking elements. More...
Classes | |
| class | LogThinkerVisitor |
| Visitor printing thinkers. More... | |
Public Member Functions | |
| Console | getConsole () |
| Console to use. | |
| String | getLogPrefix () |
| Prefix prepended to logs written. | |
| ElementVisitor | getVisitor () |
| Visitor to apply to thinkers. | |
| void | logThinker (Element element) |
| Print thinker. | |
| void | logThinkers (GameWorld gameWorld) |
| Print thinking elements and behaviors in game world. | |
| DebugLogThinkers | new () |
| Create debug instance using BaseGameApp. | |
| DebugLogThinkers | new (Console console) |
| Create debug instance. | |
| void | setConsole (Console console) |
| Set console to use. | |
| void | setLogPrefix (String prefix) |
| Set prefix prepended to logs written. | |
| void | setVisitor (ElementVisitor visitor) |
| Set visitor to apply to thinkers. | |
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.
Referenced by logThinker(), and setConsole().
| String Dragengine.Debugging.DebugLogThinkers.getLogPrefix | ( | ) |
Prefix prepended to logs written.
Referenced by logThinker().
| ElementVisitor Dragengine.Debugging.DebugLogThinkers.getVisitor | ( | ) |
Visitor to apply to thinkers.
Referenced by logThinker().
| void Dragengine.Debugging.DebugLogThinkers.logThinker | ( | Element | element | ) |
Print thinker.
Applies visitor to thinker.
References getConsole(), getLogPrefix(), getVisitor(), logThinker(), logThinkers(), setConsole(), setLogPrefix(), and setVisitor().
Referenced by logThinker().
| void Dragengine.Debugging.DebugLogThinkers.logThinkers | ( | GameWorld | gameWorld | ) |
| DebugLogThinkers Dragengine.Debugging.DebugLogThinkers.new | ( | ) |
Create debug instance using BaseGameApp.
Referenced by logThinkers(), and setVisitor().
| DebugLogThinkers Dragengine.Debugging.DebugLogThinkers.new | ( | Console | console | ) |
Create debug instance.
| void Dragengine.Debugging.DebugLogThinkers.setConsole | ( | Console | console | ) |
| void Dragengine.Debugging.DebugLogThinkers.setLogPrefix | ( | String | prefix | ) |
Set prefix prepended to logs written.
Referenced by logThinker().
| void Dragengine.Debugging.DebugLogThinkers.setVisitor | ( | ElementVisitor | visitor | ) |