using System.Collections;
using System.Collections.Generic;
using UnityEngine;
///
/// A class that has static functions for printing text in the DebugConsole.
///
public class Term {
private static DebugConsole Console;
///
/// Sets the singleton that will be used in other static functions.
///
/// Console.
public static void SetDebugConsole(DebugConsole console) {
Console = console;
}
///
/// Returns whether or not the DebugConsole is currently on the screen, ready to be used.
///
/// true if is visible; otherwise, false.
public static bool IsVisible() {
if (Console == null) {
return false;
} else {
return Console.Visible;
}
}
///
/// See .
///
/// Text.
public static void Println(string text) {
if (Console == null) {
Debug.Log(text);
} else {
Console.Println(text);
}
}
///
/// See .
///
/// Text.
public static void Print(string text) {
if (Console == null) {
Debug.Log(text);
} else {
Console.Print(text);
}
}
///
/// See
///
/// Command.
/// Description.
/// Action.
public static void AddCommand(string command, string description, DebugConsoleAction.Action action) {
if (Console != null) {
Console.AddCommand(command, description, action);
}
}
}