Exemplo n.º 1
0
 protected override void LoadContent()
 {
     SpaceBackground.LoadContent(Content);
     ViewHelper.LoadContent(Content);
     _gui.LoadContent(Content);
     GameModel.LoadWorld();
 }
Exemplo n.º 2
0
 private void DrawBackground()
 {
     _spriteBatch.Begin();
     SpaceBackground.Draw(_spriteBatch,
                          (int)_localShip.Location.X,
                          (int)_localShip.Location.Y,
                          GraphicsDevice.Viewport.Width,
                          GraphicsDevice.Viewport.Height
                          );
     _spriteBatch.End();
 }
Exemplo n.º 3
0
        protected override void Initialize()
        {
            _graphics.PreferredBackBufferHeight = (int)WindowSize.Y;
            _graphics.PreferredBackBufferWidth  = (int)WindowSize.X;
            _graphics.ApplyChanges();

            _spriteBatch = new SpriteBatch(GraphicsDevice);

            SpaceBackground.Initialize();

            NewGame();

            base.Initialize();
        }
Exemplo n.º 4
0
        protected override void Initialize()
        {
            // set up display size
            _graphics.PreferredBackBufferHeight = (int)WindowSize.Y;
            _graphics.PreferredBackBufferWidth  = (int)WindowSize.X;
            _graphics.ApplyChanges();

            _spriteBatch = new SpriteBatch(GraphicsDevice);

            TimeRemaining = GameDuration;

            SpaceBackground.Initialize();
            ConnectionManager.Initialize();
            GameModel.Initialize(this);
            SyncManager.Start();

            _gui.Initialize();

            GameOver = false;

            base.Initialize();
        }
Exemplo n.º 5
0
 protected override void UnloadContent()
 {
     SpaceBackground.UnloadContent();
     ViewHelper.UnloadContent();
 }
Exemplo n.º 6
0
 protected override void LoadContent()
 {
     SpaceBackground.LoadContent(Content);
     ViewHelper.LoadContent(Content);
 }