1 #region Using Statements
4 using Microsoft.Xna.Framework;
5 using Microsoft.Xna.Framework.Graphics;
6 using Microsoft.Xna.Framework.Storage;
7 using Microsoft.Xna.Framework.Input;
11 namespace SuperPolarityLinux
14 /// This is the main type for your game
16 public class Game1 : Game
18 GraphicsDeviceManager graphics;
19 SpriteBatch spriteBatch;
23 graphics = new GraphicsDeviceManager (this);
24 Content.RootDirectory = "Content";
25 graphics.IsFullScreen = true;
29 /// Allows the game to perform any initialization it needs to before starting to run.
30 /// This is where it can query for any required services and load any non-graphic
31 /// related content. Calling base.Initialize will enumerate through any components
32 /// and initialize them as well.
34 protected override void Initialize ()
36 // TODO: Add your initialization logic here
42 /// LoadContent will be called once per game and is the place to load
43 /// all of your content.
45 protected override void LoadContent ()
47 // Create a new SpriteBatch, which can be used to draw textures.
48 spriteBatch = new SpriteBatch (GraphicsDevice);
50 //TODO: use this.Content to load your game content here
54 /// Allows the game to run logic such as updating the world,
55 /// checking for collisions, gathering input, and playing audio.
57 /// <param name="gameTime">Provides a snapshot of timing values.</param>
58 protected override void Update (GameTime gameTime)
60 // For Mobile devices, this logic will close the Game when the Back button is pressed
61 if (GamePad.GetState (PlayerIndex.One).Buttons.Back == ButtonState.Pressed) {
64 // TODO: Add your update logic here
65 base.Update (gameTime);
69 /// This is called when the game should draw itself.
71 /// <param name="gameTime">Provides a snapshot of timing values.</param>
72 protected override void Draw (GameTime gameTime)
74 graphics.GraphicsDevice.Clear (Color.CornflowerBlue);
76 //TODO: Add your drawing code here