A MonoGame Game instance that runs SadConsole. This is used when you don't provide one and call Engine.Initialize(string, int, int).
Inheritance: Microsoft.Xna.Framework.Game
Exemplo n.º 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()
     {
     });
 }
Exemplo n.º 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() { });
 }
Exemplo n.º 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);
 }