예제 #1
0
 public static void Main(string[] arg)
 {
     using (Game g = new Scene0())
     {
         g.IsMouseVisible = true;
         g.Run();
     }
 }
예제 #2
0
 protected override void LoadContent()
 {
     spriteBatch = new SpriteBatch(GraphicsDevice);
     soundCenter = new SoundCenter(this);
     font        = Content.Load <SpriteFont>("MyFont");
     Services.AddService(typeof(SpriteBatch), spriteBatch);
     Services.AddService(typeof(SoundCenter), soundCenter);
     Services.AddService(typeof(SpriteFont), font);
     scene0 = new Scene0(this);
     scene1 = new Scene1(this, screenWidth, screenHeight, 1);
     scene2 = new Scene2(this, screenWidth, screenHeight);
     scene2.Hide();
     scene1.Hide();
     scene0.Show();
     Components.Add(scene0);
     Components.Add(scene1);
     Components.Add(scene2);
 }
예제 #3
0
 protected override void LoadContent()
 {
     _spriteBatch   = new SpriteBatch(GraphicsDevice);
     _device        = _graphics.GraphicsDevice;
     ScreenWidth    = _device.PresentationParameters.BackBufferWidth;
     ScreenHeight   = _device.PresentationParameters.BackBufferHeight;
     _soundCenter   = new SoundCenter(this);
     _textureCenter = new TextureCenter(this);
     _font          = Content.Load <SpriteFont>("MyFont");
     Services.AddService(typeof(SpriteBatch), _spriteBatch);
     Services.AddService(typeof(SoundCenter), _soundCenter);
     Services.AddService(typeof(SpriteFont), _font);
     Services.AddService(typeof(TextureCenter), _textureCenter);
     _scene0 = new Scene0(this);
     _scene1 = new Scene1(this, _device);
     _scene1.Hide();
     _scene0.Show();
     Components.Add(_scene0);
     Components.Add(_scene1);
 }