using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;
static class Program
{
static void Main(string[] args)
{
using (Game game01= new Game())
{
game01.Run();
}
}
}
public class Game : Microsoft.Xna.Framework.Game
{
GraphicsDeviceManager gr;
SpriteBatch spriteBatch;
public Game()
{
gr = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
}
protected override void Initialize()
{
base.Window.Title = "XNA ";
base.Initialize();
}
protected override void LoadContent()
{
spriteBatch = new SpriteBatch(GraphicsDevice);
}
protected override void UnloadContent()
{
}
protected override void Update(GameTime gameTime)
{
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed ||
Keyboard.GetState().IsKeyDown(Keys.Escape)) this.Exit();
base.Update(gameTime);
}
protected override void Draw(GameTime gameTime)
{
gr.GraphicsDevice.Clear(Color.Blue);
base.Draw(gameTime);
}
}
最終更新:2011年01月30日 14:41