mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-01-02 03:18:23 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
33 lines
741 B
C#
33 lines
741 B
C#
namespace Facepunch;
|
|
|
|
public static class Log
|
|
{
|
|
public static void Info( string message )
|
|
{
|
|
Console.WriteLine( message );
|
|
}
|
|
|
|
public static void Warning( string message )
|
|
{
|
|
var colorBefore = Console.ForegroundColor;
|
|
Console.ForegroundColor = ConsoleColor.Yellow;
|
|
Console.WriteLine( message );
|
|
Console.ForegroundColor = colorBefore;
|
|
}
|
|
|
|
public static void Error( string message )
|
|
{
|
|
var colored = Console.ForegroundColor;
|
|
Console.ForegroundColor = ConsoleColor.Red;
|
|
Console.WriteLine( message );
|
|
Console.ForegroundColor = colored;
|
|
}
|
|
|
|
public static void Header( string message )
|
|
{
|
|
var messageWithHeader = $"========== {message} ========== ";
|
|
Console.WriteLine();
|
|
Console.WriteLine( messageWithHeader );
|
|
}
|
|
}
|