//----------------------------------------------------------------------------- // SampleGame.cs // // Microsoft XNA Community Game Platform // Copyright (C) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- using System; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.GamerServices; using Microsoft.Xna.Framework.Graphics; namespace UserInterfaceSample { public class SampleGame : Microsoft.Xna.Framework.Game { GraphicsDeviceManager graphics; ScreenManager screenManager; public SampleGame() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; // Frame rate is 30 fps by default for Windows Phone. TargetElapsedTime = TimeSpan.FromTicks(333333); // Disable the status bar graphics.IsFullScreen = true; screenManager = new ScreenManager(this); Components.Add(screenManager); // attempt to deserialize the screen manager from disk. if that fails, we add our default screens. if (!screenManager.DeserializeState()) { // Activate the first screens. screenManager.AddScreen(new BackgroundScreen(), null); screenManager.AddScreen(new MainMenuScreen(), null); } } protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.Black); base.Draw(gameTime); } } }