/// <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() { }); }
/// <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() { }); }
/// <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); }