Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
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.
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.

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.

Referenced by logThinker(), and setConsole().

◆ getLogPrefix()

String Dragengine.Debugging.DebugLogThinkers.getLogPrefix ( )

Prefix prepended to logs written.

Referenced by logThinker().

◆ getVisitor()

ElementVisitor Dragengine.Debugging.DebugLogThinkers.getVisitor ( )

Visitor to apply to thinkers.

Referenced by logThinker().

◆ 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().

◆ logThinkers()

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

Print thinking elements and behaviors in game world.

References new().

Referenced by logThinker().

◆ new() [1/2]

DebugLogThinkers Dragengine.Debugging.DebugLogThinkers.new ( )

Create debug instance using BaseGameApp.

Referenced by logThinkers(), and setVisitor().

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

References getConsole().

Referenced by logThinker().

◆ setLogPrefix()

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

Set prefix prepended to logs written.

Referenced by logThinker().

◆ setVisitor()

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

Set visitor to apply to thinkers.

References new().

Referenced by logThinker().


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