Add screens

This commit is contained in:
Julian
2021-05-14 10:40:55 +02:00
parent ff05d9a81b
commit f54b093615
3 changed files with 38 additions and 4 deletions

View File

@@ -1,11 +1,12 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
namespace Barbs
{
class Program : Game
class Program : Game, IDisposable
{
Texture2D ballTexture;
private GraphicsDeviceManager graphics;
@@ -51,6 +52,12 @@ namespace Barbs
this.testLine.InitOnGraphicalDevice(GraphicsDevice);
}
protected void Dispose()
{
//Cleanup
// OR Final call before shutdown
}
protected override void Update(GameTime gameTime)
{
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
@@ -82,8 +89,11 @@ namespace Barbs
static void Main(string[] args)
{
var pro = new Program();
pro.Run();
using (Program game = new Program())
{
game.Run();
}
}
}
}