GameLogger
Namespace: Murder.Diagnostics
Assembly: Murder.dll
public class GameLogger
⭐ Constructors
protected GameLogger()
This is a singleton.
⭐ Properties
_instance
protected static GameLogger _instance;
Returns
GameLogger
_lastInputIndex
protected int _lastInputIndex;
Returns
int
_lastInputs
protected readonly String[] _lastInputs;
These are for supporting ^ functionality in console. Fancyy....
Returns
string[]
_log
protected readonly List<T> _log;
Returns
List<T>
_resetInputFocus
protected bool _resetInputFocus;
Returns
bool
_scrollToBottom
protected int _scrollToBottom;
Returns
int
_showDebug
protected bool _showDebug;
Returns
bool
_traceCount
protected static const int _traceCount;
Returns
int
IsShowing
public static bool IsShowing { get; }
Returns
bool
⭐ Methods
Input(Func<T, TResult>)
protected virtual void Input(Func<T, TResult> onInputAction)
Receive input from the user. Called when a console is displayed.
Parameters
onInputAction Func<T, TResult>
LogText(bool)
protected virtual void LogText(bool copy)
Log text in the console display. Called when a console is displayed.
Parameters
copy bool
TopBar(Boolean&)
protected virtual void TopBar(Boolean& copy)
Parameters
copy bool&
ClearLog()
protected void ClearLog()
LogCommand(string)
protected void LogCommand(string msg)
Parameters
msg string
LogCommandOutput(string)
protected void LogCommandOutput(string msg)
Parameters
msg string
CaptureCrash(Exception, string)
public bool CaptureCrash(Exception _, string logFile)
Used to filter exceptions once a crash is yet to happen.
Parameters
_ Exception
logFile string
Returns
bool
GetOrCreateInstance()
public GameLogger GetOrCreateInstance()
Returns
GameLogger
FetchLogs()
public ImmutableArray<T> FetchLogs()
Returns
ImmutableArray<T>
GetCurrentLog()
public string GetCurrentLog()
Returns
string
DrawConsole(Func<T, TResult>)
public virtual void DrawConsole(Func<T, TResult> onInputAction)
Draws the console of the game.
Parameters
onInputAction Func<T, TResult>
TrackImpl(string, Object)
public virtual void TrackImpl(string variableName, Object value)
Parameters
variableName string
value Object
ClearAllGraphs()
public void ClearAllGraphs()
ClearGraph(string)
public void ClearGraph(string callerFilePath)
Parameters
callerFilePath string
Error(string, string, int)
public void Error(string msg, string memberName, int lineNumber)
Parameters
msg string
memberName string
lineNumber int
Fail(string)
public void Fail(string message)
This will fail a given message and paste it in the log.
Parameters
message string
Initialize(bool)
public void Initialize(bool diagnostic)
Parameters
diagnostic bool
Log(string, Vector4)
public void Log(string v, Vector4 color)
Parameters
v string
color Vector4
Log(string, T?)
public void Log(string v, T? color)
LogPerf(string, T?)
public void LogPerf(string v, T? color)
PlotGraph(float, int, string)
public void PlotGraph(float point, int max, string callerFilePath)
Parameters
point float
max int
callerFilePath string
PlotGraph(float, string)
public void PlotGraph(float point, string callerFilePath)
Parameters
point float
callerFilePath string
Toggle(bool)
public void Toggle(bool value)
Parameters
value bool
ToggleDebugWindow()
public void ToggleDebugWindow()
Track(string, Object)
public void Track(string variableName, Object value)
Parameters
variableName string
value Object
Verify(bool, string)
public void Verify(bool condition, string message)
This will verify a condition. If false, this will paste
Parameters
condition bool
message string
Verify(bool)
public void Verify(bool condition)
This will verify a condition. If false, this will paste in the log.
Parameters
condition bool
Warning(string, string, int)
public void Warning(string msg, string memberName, int lineNumber)
Parameters
msg string
memberName string
lineNumber int
⚡