protected override void Initialize() { // Let the XNA framework show the mouse. IsMouseVisible = true; IsFixedTimeStep = true; // Initialize the SadConsole engine and the first effects library (provided by the SadConsole.Effects.dll binary) SadConsole.Engine.Initialize(graphics, "Cheepicus12.font", 40, 25); // Tell SadConsole to track the mouse. SadConsole.Engine.UseMouse = true; // Create the default console, show the cursor, and let the console accept keyboard input. gameMenuConsole = new GameMenuConsole(); gameMenuConsole.PlayGame += StartGame; // Add the default console to the list of consoles. SadConsole.Engine.ConsoleRenderStack = new ConsoleList() { gameMenuConsole }; SadConsole.Engine.ConsoleRenderStack[0].IsVisible = true; // Set the first console in the console list as the "active" console. This allows the keyboard to be processed on the console. SadConsole.Engine.ActiveConsole = SadConsole.Engine.ConsoleRenderStack[0]; // Call the default initialize of the base class. base.Initialize(); }
private static void Init() { // Setup window SadConsole.Game.Instance.Window.Title = "Castle Adventure - Powered by SadConsole"; // Setup variables gameSpeed = new TimeSpan(0, 0, 0, 0, gameSpeedMs); lastGameUpdate = new TimeSpan(0, 0, 0, 0, 0); // Create consoles gameMenuConsole = new GameMenuConsole(); gameMenuConsole.PlayGame += StartGame; SadConsole.Global.CurrentScreen = gameMenuConsole; SadConsole.Global.FocusedConsoles.Set(gameMenuConsole); }
protected override void Initialize() { // Let the XNA framework show the mouse. IsMouseVisible = true; IsFixedTimeStep = true; // Initialize the SadConsole engine and the first effects library (provided by the SadConsole.Effects.dll binary) SadConsole.Engine.Initialize(GraphicsDevice); // Tell SadConsole to track the mouse. SadConsole.Engine.UseMouse = true; // Load the default font. using (var stream = System.IO.File.OpenRead("Fonts/Cheepicus12.font")) { SadConsole.Engine.DefaultFont = SadConsole.Serializer.Deserialize <Font>(stream); } // Using the default font, resize the window to a Width,Height of cells. This example uses the MS-DOS default of 80 columns by 25 rows. SadConsole.Engine.DefaultFont.ResizeGraphicsDeviceManager(graphics, 40, 25, 0, 0); // Create the default console, show the cursor, and let the console accept keyboard input. gameMenuConsole = new GameMenuConsole(); gameMenuConsole.PlayGame += StartGame; // Add the default console to the list of consoles. SadConsole.Engine.ConsoleRenderStack = new ConsoleList() { gameMenuConsole }; SadConsole.Engine.ConsoleRenderStack[0].IsVisible = true; // Set the first console in the console list as the "active" console. This allows the keyboard to be processed on the console. SadConsole.Engine.ActiveConsole = SadConsole.Engine.ConsoleRenderStack[0]; // Call the default initialize of the base class. base.Initialize(); }
protected override void Initialize() { // Let the XNA framework show the mouse. IsMouseVisible = true; IsFixedTimeStep = true; // Initialize the SadConsole engine and the first effects library (provided by the SadConsole.Effects.dll binary) SadConsole.Engine.Initialize(GraphicsDevice); // Tell SadConsole to track the mouse. SadConsole.Engine.UseMouse = true; // Load the default font. using (var stream = System.IO.File.OpenRead("Fonts/Cheepicus12.font")) { SadConsole.Engine.DefaultFont = SadConsole.Serializer.Deserialize<Font>(stream); } // Using the default font, resize the window to a Width,Height of cells. This example uses the MS-DOS default of 80 columns by 25 rows. SadConsole.Engine.DefaultFont.ResizeGraphicsDeviceManager(graphics, 40, 25, 0, 0); // Create the default console, show the cursor, and let the console accept keyboard input. gameMenuConsole = new GameMenuConsole(); gameMenuConsole.PlayGame += StartGame; // Add the default console to the list of consoles. SadConsole.Engine.ConsoleRenderStack = new ConsoleList() { gameMenuConsole }; SadConsole.Engine.ConsoleRenderStack[0].IsVisible = true; // Set the first console in the console list as the "active" console. This allows the keyboard to be processed on the console. SadConsole.Engine.ActiveConsole = SadConsole.Engine.ConsoleRenderStack[0]; // Call the default initialize of the base class. base.Initialize(); }