A MonoGame Game instance that runs SadConsole. This is used when you don't provide one and call Engine.Initialize(string, int, int).
상속: Microsoft.Xna.Framework.Game
예제 #1
0
 /// <summary>
 /// Prepares the engine for use. This must be the first method you call on the engine, then call <see cref="Run"/> to start SadConsole.
 /// </summary>
 /// <param name="font">The font to load as the <see cref="DefaultFont"/>.</param>
 /// <param name="consoleWidth">The width of the default root console (and game window).</param>
 /// <param name="consoleHeight">The height of the default root console (and game window).</param>
 /// <param name="ctorCallback">Optional callback from the MonoGame Game class constructor.</param>
 /// <returns>The default active console.</returns>
 public static void Initialize(string font, int consoleWidth, int consoleHeight, Action <SadConsoleGame> ctorCallback = null)
 {
     MonoGameInstance          = new SadConsoleGame(font, consoleWidth, consoleHeight, ctorCallback);
     MonoGameInstance.Exiting += (s, e) => EngineShutdown?.Invoke(null, new ShutdownEventArgs()
     {
     });
 }
예제 #2
0
 /// <summary>
 /// Prepares the engine for use. This must be the first method you call on the engine, then call <see cref="Run"/> to start SadConsole.
 /// </summary>
 /// <param name="font">The font to load as the <see cref="DefaultFont"/>.</param>
 /// <param name="consoleWidth">The width of the default root console (and game window).</param>
 /// <param name="consoleHeight">The height of the default root console (and game window).</param>
 /// <param name="ctorCallback">Optional callback from the MonoGame Game class constructor.</param>
 /// <returns>The default active console.</returns>
 public static void Initialize(string font, int consoleWidth, int consoleHeight, Action<SadConsoleGame> ctorCallback = null)
 {
     MonoGameInstance = new SadConsoleGame(font, consoleWidth, consoleHeight, ctorCallback);
     MonoGameInstance.Exiting += (s, e) => EngineShutdown?.Invoke(null, new ShutdownEventArgs() { });
 }
예제 #3
0
 /// <summary>
 /// Prepares the engine for use. This must be the first method you call on the engine, then call <see cref="Run"/> to start SadConsole.
 /// </summary>
 /// <param name="font">The font to load as the <see cref="DefaultFont"/>.</param>
 /// <param name="consoleWidth">The width of the default root console (and game window).</param>
 /// <param name="consoleHeight">The height of the default root console (and game window).</param>
 /// <returns>The default active console.</returns>
 public static void Initialize(string font, int consoleWidth, int consoleHeight)
 {
     MonoGameInstance = new SadConsoleGame(font, consoleWidth, consoleHeight);
 }