Example #1
0
 protected override void LoadContent()
 {
     SpaceBackground.LoadContent(Content);
     ViewHelper.LoadContent(Content);
     _gui.LoadContent(Content);
     GameModel.LoadWorld();
 }
Example #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();
 }
Example #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();
        }
Example #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();
        }
Example #5
0
 protected override void UnloadContent()
 {
     SpaceBackground.UnloadContent();
     ViewHelper.UnloadContent();
 }
Example #6
0
 protected override void LoadContent()
 {
     SpaceBackground.LoadContent(Content);
     ViewHelper.LoadContent(Content);
 }