diff options
author | chai <215380520@qq.com> | 2024-06-03 00:27:28 +0800 |
---|---|---|
committer | chai <215380520@qq.com> | 2024-06-03 00:27:28 +0800 |
commit | 6adb4d7a11a522fab159562f2dda6ced30885fb4 (patch) | |
tree | 0d47531f7800bd65041685550468761f3f5ffb48 /Projects/Tools/UGEditor/Game1.cs | |
parent | 3cf4c5121994dbbf548d9f0f3a5ccd5bc15c174c (diff) |
+UGEditor project
Diffstat (limited to 'Projects/Tools/UGEditor/Game1.cs')
-rw-r--r-- | Projects/Tools/UGEditor/Game1.cs | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Projects/Tools/UGEditor/Game1.cs b/Projects/Tools/UGEditor/Game1.cs new file mode 100644 index 0000000..2c87347 --- /dev/null +++ b/Projects/Tools/UGEditor/Game1.cs @@ -0,0 +1,52 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Input; + +namespace UGEditor +{ + 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); + } + } +} |