Drag[en]gine Script Module DragonScript  1.23
Dragengine.Debugging.DebugLogThinkers Class Reference

Debug log thinking elements. More...

Inheritance diagram for Dragengine.Debugging.DebugLogThinkers:

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...
 

Detailed Description

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.

Member Function Documentation

◆ getConsole()

Console Dragengine.Debugging.DebugLogThinkers.getConsole ( )

Console to use.

◆ getLogPrefix()

String Dragengine.Debugging.DebugLogThinkers.getLogPrefix ( )

Prefix prepended to logs written.

◆ getVisitor()

ElementVisitor Dragengine.Debugging.DebugLogThinkers.getVisitor ( )

Visitor to apply to thinkers.

◆ logThinker()

void Dragengine.Debugging.DebugLogThinkers.logThinker ( Element  element)

Print thinker.

Applies visitor to thinker.

◆ logThinkers()

void Dragengine.Debugging.DebugLogThinkers.logThinkers ( GameWorld  gameWorld)

Print thinking elements and behaviors in game world.

◆ new() [1/2]

DebugLogThinkers Dragengine.Debugging.DebugLogThinkers.new ( )

Create debug instance using BaseGameApp.

◆ new() [2/2]

DebugLogThinkers Dragengine.Debugging.DebugLogThinkers.new ( Console  console)

Create debug instance.

◆ setConsole()

void Dragengine.Debugging.DebugLogThinkers.setConsole ( Console  console)

Set console to use.

◆ setLogPrefix()

void Dragengine.Debugging.DebugLogThinkers.setLogPrefix ( String  prefix)

Set prefix prepended to logs written.

◆ setVisitor()

void Dragengine.Debugging.DebugLogThinkers.setVisitor ( ElementVisitor  visitor)

Set visitor to apply to thinkers.


The documentation for this class was generated from the following file: