From 377f79b3cc234082264b0629145062b6f1a5b9be Mon Sep 17 00:00:00 2001 From: BoredGuy Date: Mon, 12 Jan 2026 08:49:11 +0300 Subject: Initial Commit --- MonoGameLibrary/Game1.cs | 51 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 MonoGameLibrary/Game1.cs (limited to 'MonoGameLibrary/Game1.cs') diff --git a/MonoGameLibrary/Game1.cs b/MonoGameLibrary/Game1.cs new file mode 100644 index 0000000..49937ae --- /dev/null +++ b/MonoGameLibrary/Game1.cs @@ -0,0 +1,51 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Input; + +namespace MonoGameLibrary; + +public class Game1 : Game +{ + private GraphicsDeviceManager _graphics; + private SpriteBatch _spriteBatch; + + public Game1() + { + _graphics = new GraphicsDeviceManager(this); + Content.RootDirectory = "Content"; + IsMouseVisible = true; + } + + protected override void Initialize() + { + // TODO: Add your initialization logic here + + base.Initialize(); + } + + protected override void LoadContent() + { + _spriteBatch = new SpriteBatch(GraphicsDevice); + + // TODO: use this.Content to load your game content here + } + + protected override void Update(GameTime gameTime) + { + if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape)) + Exit(); + + // TODO: Add your update logic here + + base.Update(gameTime); + } + + protected override void Draw(GameTime gameTime) + { + GraphicsDevice.Clear(Color.CornflowerBlue); + + // TODO: Add your drawing code here + + base.Draw(gameTime); + } +} -- cgit v1.2.3