Add screens
This commit is contained in:
18
Program.cs
18
Program.cs
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user