From 26e3456fa560a90638da0c4d35d6a19d6b88a4a3 Mon Sep 17 00:00:00 2001 From: BoredGuy Date: Sun, 8 Feb 2026 09:38:13 +0300 Subject: Back on Track --- MonoGameLibrary/Core.cs | 102 ++++++++++++++++++++++++------------------------ 1 file changed, 51 insertions(+), 51 deletions(-) (limited to 'MonoGameLibrary/Core.cs') diff --git a/MonoGameLibrary/Core.cs b/MonoGameLibrary/Core.cs index fddcc0c..77377d1 100644 --- a/MonoGameLibrary/Core.cs +++ b/MonoGameLibrary/Core.cs @@ -1,51 +1,51 @@ -using System; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Content; -using Microsoft.Xna.Framework.Graphics; - -namespace MonoGameLibrary; - -public class Core : Game { - internal static Core s_instance; - - public static Core Instance => s_instance; - - public static GraphicsDeviceManager Graphics { get; set; } - public static new GraphicsDevice GraphicsDevice { get; private set; } - public static SpriteBatch SpriteBatch { get; private set; } - public static new ContentManager Content { get; private set; } - - bool ShowFrameRate { get; set; } = false; - - public Core(string title, int width, int height, bool fullscreen) { - if (s_instance != null) { - throw new InvalidOperationException($"Only a single Core instance can be created"); - } - - s_instance = this; - - Graphics = new GraphicsDeviceManager(this); - - Graphics.PreferredBackBufferWidth = width; - Graphics.PreferredBackBufferHeight = height; - Graphics.IsFullScreen = fullscreen; - Graphics.SynchronizeWithVerticalRetrace = true; - - Graphics.ApplyChanges(); - - Window.Title = title; - - Content = base.Content; - - Content.RootDirectory = "Content"; - - IsMouseVisible = true; - } - - protected override void Initialize() { - base.Initialize(); - - GraphicsDevice = base.GraphicsDevice; - SpriteBatch = new SpriteBatch(GraphicsDevice); - } -} +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Content; +using Microsoft.Xna.Framework.Graphics; + +namespace MonoGameLibrary; + +public class Core : Game { + internal static Core s_instance; + + public static Core Instance => s_instance; + + public static GraphicsDeviceManager Graphics { get; set; } + public static new GraphicsDevice GraphicsDevice { get; private set; } + public static SpriteBatch SpriteBatch { get; private set; } + public static new ContentManager Content { get; private set; } + + bool ShowFrameRate { get; set; } = false; + + public Core(string title, int width, int height, bool fullscreen) { + if (s_instance != null) { + throw new InvalidOperationException($"Only a single Core instance can be created"); + } + + s_instance = this; + + Graphics = new GraphicsDeviceManager(this); + + Graphics.PreferredBackBufferWidth = width; + Graphics.PreferredBackBufferHeight = height; + Graphics.IsFullScreen = fullscreen; + Graphics.SynchronizeWithVerticalRetrace = true; + + Graphics.ApplyChanges(); + + Window.Title = title; + + Content = base.Content; + + Content.RootDirectory = "Content"; + + IsMouseVisible = true; + } + + protected override void Initialize() { + base.Initialize(); + + GraphicsDevice = base.GraphicsDevice; + SpriteBatch = new SpriteBatch(GraphicsDevice); + } +} -- cgit v1.2.3