using System; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; namespace Samples.SLMC { public class SLMCGame : Game { GraphicsDeviceManager graphics; SLMCSampleComponent _slmcSampleComponent; public SLMCGame() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; graphics.PreferredBackBufferWidth = 800; graphics.PreferredBackBufferHeight = 480; _slmcSampleComponent = new SLMCSampleComponent(this, graphics); Components.Add(_slmcSampleComponent); } protected override void LoadContent() { } /// Provides a snapshot of timing values. protected override void Update(GameTime gameTime) { KeyboardState keyState = Keyboard.GetState(); GamePadState gamePadState = GamePad.GetState(PlayerIndex.One); if (keyState.IsKeyDown(Keys.Escape) || gamePadState.Buttons.Back == ButtonState.Pressed) Exit(); base.Update(gameTime); } protected override void Draw(GameTime gameTime) { GraphicsDevice.SetRenderTarget(null); GraphicsDevice.Clear(Color.Black); base.Draw(gameTime); } } }