mta-mono/MultiTheftAuto/Console.cs

56 lines
1.2 KiB
C#
Raw Normal View History

2015-12-12 19:27:23 +00:00
using System;
using System.Runtime.CompilerServices;
2015-12-12 19:27:23 +00:00
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MultiTheftAuto
{
public class Console : Player
{
private Console()
2015-12-12 19:27:23 +00:00
{
}
[MethodImpl( MethodImplOptions.InternalCall )]
public static extern bool Output( string text, Element element = null );
2015-12-12 19:27:23 +00:00
public static int Read()
{
return System.Console.Read();
}
public static ConsoleKeyInfo ReadKey()
{
return System.Console.ReadKey();
}
public static ConsoleKeyInfo ReadKey( bool intercept )
{
return System.Console.ReadKey( intercept );
}
public static string ReadLine()
{
return System.Console.ReadLine();
}
[MethodImpl( MethodImplOptions.InternalCall )]
private static extern void Write( string message );
[MethodImpl( MethodImplOptions.InternalCall )]
private static extern void WriteLine( string message );
public static void Write( string message, params object[] args )
2015-12-12 19:27:23 +00:00
{
Write( String.Format( message, args ) );
2015-12-12 19:27:23 +00:00
}
public static void WriteLine( string message, params object[] args )
2015-12-12 19:27:23 +00:00
{
WriteLine( String.Format( message, args ) );
2015-12-12 19:27:23 +00:00
}
}
}