Otter  0.9.88
2d Game Development Framework based on SFML.Net
 All Classes Namespaces Functions Variables Enumerations Properties
Otter.Debugger Class Reference

The debug console. Only exists when the game is built in Debug Mode. The game will handle using this class. Can be summoned by default with the ~ key. More...

Public Member Functions

void ShowPerformance (int level)
 Display performance information at a specified detail level. Set to 0 to disable. 5 is the most detailed. More...
 
void LogTag (string tag)
 Toggle the logging of a specific tag. If the tag is off, it will be turned on, and vice versa. More...
 
void EnableCommandGroup (string group)
 Enables commands in a specific group to be used. More...
 
void DisableCommandGroup (string group)
 Disables commands in a specific group. More...
 
void Log (string tag, object str, bool timestamp=true)
 Writes log data to the console. More...
 
void Log (object str, bool timestamp=true)
 Writes log data to the console. More...
 
void Error (string message)
 Send an error message to the debugger. Only really makes sense when the debugger is currently open, so probably want to call this from an OtterCommand method when something goes wrong. More...
 
void Watch (string str, object obj)
 Add a variable to the watch list of the debug console. This must be called on every update to see the latest value! More...
 
void RegisterCommands ()
 Refreshes the available commands by finding any methods tagged with the OtterCommand attribute. Don't do this a lot. More...
 

Public Attributes

Key ToggleKey = Key.Tilde
 The key used to summon and dismiss the debug console. More...
 

Static Public Attributes

static Debugger Instance
 Reference to the active instance of the debugger. More...
 

Properties

bool IsOpen [get, set]
 If the debug console is currently open. More...
 
bool Visible [get, set]
 If the debug console is currently visible. More...
 
float DebugCameraX [get, set]
 The offset of the camera X set by debug camera mode. More...
 
float DebugCameraY [get, set]
 The offset of the camera Y set by debug camera mode. More...
 
int LiveConsoleSize [get, set]
 The size of the live console in lines. If 0 the live console is hidden. More...
 

Detailed Description

The debug console. Only exists when the game is built in Debug Mode. The game will handle using this class. Can be summoned by default with the ~ key.

Member Function Documentation

void Otter.Debugger.DisableCommandGroup ( string  group)

Disables commands in a specific group.

Parameters
group
void Otter.Debugger.EnableCommandGroup ( string  group)

Enables commands in a specific group to be used.

Parameters
group
void Otter.Debugger.Error ( string  message)

Send an error message to the debugger. Only really makes sense when the debugger is currently open, so probably want to call this from an OtterCommand method when something goes wrong.

Parameters
messageThe message to show.
void Otter.Debugger.Log ( string  tag,
object  str,
bool  timestamp = true 
)

Writes log data to the console.

Parameters
tagThe tag to associate the log with.
strThe string to add to the console.
timestampInclude a timestamp with the item.
void Otter.Debugger.Log ( object  str,
bool  timestamp = true 
)

Writes log data to the console.

Parameters
strThe string to add to the console.
timestampInclude a timestamp with the item.
void Otter.Debugger.LogTag ( string  tag)

Toggle the logging of a specific tag. If the tag is off, it will be turned on, and vice versa.

Parameters
tagThe tag to toggle.
void Otter.Debugger.RegisterCommands ( )

Refreshes the available commands by finding any methods tagged with the OtterCommand attribute. Don't do this a lot.

void Otter.Debugger.ShowPerformance ( int  level)

Display performance information at a specified detail level. Set to 0 to disable. 5 is the most detailed.

Parameters
levelThe level of detail. 0 for disabled, 5 for the most detailed.
void Otter.Debugger.Watch ( string  str,
object  obj 
)

Add a variable to the watch list of the debug console. This must be called on every update to see the latest value!

Parameters
strThe label for the value.
objThe value.

Member Data Documentation

Debugger Otter.Debugger.Instance
static

Reference to the active instance of the debugger.

Key Otter.Debugger.ToggleKey = Key.Tilde

The key used to summon and dismiss the debug console.

Property Documentation

float Otter.Debugger.DebugCameraX
getset

The offset of the camera X set by debug camera mode.

float Otter.Debugger.DebugCameraY
getset

The offset of the camera Y set by debug camera mode.

bool Otter.Debugger.IsOpen
getset

If the debug console is currently open.

int Otter.Debugger.LiveConsoleSize
getset

The size of the live console in lines. If 0 the live console is hidden.

bool Otter.Debugger.Visible
getset

If the debug console is currently visible.


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