1 #region File Description
2 //-----------------------------------------------------------------------------
3 // SuperPolarityMacGame.cs
5 // Microsoft XNA Community Game Platform
6 // Copyright (C) Microsoft Corporation. All rights reserved.
7 //-----------------------------------------------------------------------------
10 #region Using Statements
13 using Microsoft.Xna.Framework;
14 using Microsoft.Xna.Framework.Audio;
15 using Microsoft.Xna.Framework.Graphics;
16 using Microsoft.Xna.Framework.Input;
17 using Microsoft.Xna.Framework.Input.Touch;
18 using Microsoft.Xna.Framework.Storage;
19 using Microsoft.Xna.Framework.Content;
20 using Microsoft.Xna.Framework.Media;
24 namespace SuperPolarityMac
27 /// Default Project Template
29 public class Game1 : Game
33 GraphicsDeviceManager graphics;
34 SpriteBatch spriteBatch;
35 Texture2D logoTexture;
38 #region Initialization
43 graphics = new GraphicsDeviceManager(this);
45 Content.RootDirectory = "Content";
47 graphics.IsFullScreen = false;
51 /// Overridden from the base Game.Initialize. Once the GraphicsDevice is setup,
52 /// we'll use the viewport to initialize some values.
54 protected override void Initialize()
61 /// Load your graphics content.
63 protected override void LoadContent()
65 // Create a new SpriteBatch, which can be use to draw textures.
66 spriteBatch = new SpriteBatch(graphics.GraphicsDevice);
68 // TODO: use this.Content to load your game content here eg.
69 logoTexture = Content.Load<Texture2D>("logo");
74 #region Update and Draw
77 /// Allows the game to run logic such as updating the world,
78 /// checking for collisions, gathering input, and playing audio.
80 /// <param name="gameTime">Provides a snapshot of timing values.</param>
81 protected override void Update(GameTime gameTime)
83 // TODO: Add your update logic here
85 base.Update(gameTime);
89 /// This is called when the game should draw itself.
91 /// <param name="gameTime">Provides a snapshot of timing values.</param>
92 protected override void Draw(GameTime gameTime)
94 // Clear the backbuffer
95 graphics.GraphicsDevice.Clear(Color.CornflowerBlue);
100 spriteBatch.Draw(logoTexture, new Vector2 (130, 200), Color.White);
104 //TODO: Add your drawing code here