--- /dev/null
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using Microsoft.Xna.Framework;\r
+using Microsoft.Xna.Framework.Audio;\r
+using Microsoft.Xna.Framework.Content;\r
+using Microsoft.Xna.Framework.GamerServices;\r
+using Microsoft.Xna.Framework.Graphics;\r
+using Microsoft.Xna.Framework.Input;\r
+using Microsoft.Xna.Framework.Media;\r
+using Microsoft.Xna.Framework.Net;\r
+using Microsoft.Xna.Framework.Storage;\r
+using CarFire;\r
+\r
+namespace CharacterTestBed\r
+{\r
+ /// <summary>\r
+ /// This is the main type for your game\r
+ /// </summary>\r
+ public class Game1 : Microsoft.Xna.Framework.Game\r
+ {\r
+ GraphicsDeviceManager graphics;\r
+ SpriteBatch spriteBatch;\r
+ Player p;\r
+ public Game1()\r
+ {\r
+ graphics = new GraphicsDeviceManager(this);\r
+ Content.RootDirectory = "Content";\r
+ }\r
+\r
+ /// <summary>\r
+ /// Allows the game to perform any initialization it needs to before starting to run.\r
+ /// This is where it can query for any required services and load any non-graphic\r
+ /// related content. Calling base.Initialize will enumerate through any components\r
+ /// and initialize them as well.\r
+ /// </summary>\r
+ protected override void Initialize()\r
+ {\r
+ // TODO: Add your initialization logic here\r
+\r
+ base.Initialize();\r
+ }\r
+\r
+ /// <summary>\r
+ /// LoadContent will be called once per game and is the place to load\r
+ /// all of your content.\r
+ /// </summary>\r
+ protected override void LoadContent()\r
+ {\r
+ // Create a new SpriteBatch, which can be used to draw textures.\r
+ spriteBatch = new SpriteBatch(GraphicsDevice);\r
+\r
+ p = new Player(new Map(), Content.Load<Texture2D>("pinball"), 4, 100, 20, 10);\r
+ // TODO: use this.Content to load your game content here\r
+ }\r
+\r
+ /// <summary>\r
+ /// UnloadContent will be called once per game and is the place to unload\r
+ /// all content.\r
+ /// </summary>\r
+ protected override void UnloadContent()\r
+ {\r
+ // TODO: Unload any non ContentManager content here\r
+ }\r
+\r
+ /// <summary>\r
+ /// Allows the game to run logic such as updating the world,\r
+ /// checking for collisions, gathering input, and playing audio.\r
+ /// </summary>\r
+ /// <param name="gameTime">Provides a snapshot of timing values.</param>\r
+ protected override void Update(GameTime gameTime)\r
+ {\r
+ // Allows the game to exit\r
+ if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)\r
+ this.Exit();\r
+\r
+ // TODO: Add your update logic here\r
+\r
+ base.Update(gameTime);\r
+ }\r
+\r
+ /// <summary>\r
+ /// This is called when the game should draw itself.\r
+ /// </summary>\r
+ /// <param name="gameTime">Provides a snapshot of timing values.</param>\r
+ protected override void Draw(GameTime gameTime)\r
+ {\r
+ GraphicsDevice.Clear(Color.CornflowerBlue);\r
+ spriteBatch.Begin(SpriteBlendMode.AlphaBlend);\r
+\r
+ p.Draw(spriteBatch);\r
+\r
+ // TODO: Add your drawing code here\r
+ spriteBatch.End();\r
+ base.Draw(gameTime);\r
+ }\r
+ }\r
+}\r