Exemplo n.º 1
0
        public void Init(ContentManager contentManager)
        {
            LoadContent();
            _globalScores = new List <Score>();

            _backgroundThread = new Thread(
                new ThreadStart(GetGlobalScores));
            _backgroundThread.Start();

            _animation           = new SimpleAnimation(_loaderTexture, 0.1f, 8);
            _loaderContainer     = new Rectangle(0, 0, 200, 200).ToCenterRightWithMargin(new Rectangle(0, 0, _gameScreenManager.GameScreenWidth, _gameScreenManager.GameScreenHeight), 200);
            _loaderRectangle     = new Rectangle(0, 0, 50, 50).ToCenter(_loaderContainer);
            _backgroundRectangle = new Rectangle(0, 0, _gameScreenManager.GameScreenWidth, _gameScreenManager.GameScreenHeight);
            _playerScoreContainer.Init();
        }
Exemplo n.º 2
0
        public void Update(GameTime gameTime)
        {
            _playerScoreContainer.Update(gameTime);

            if (_globalScoreIsLoaded && _globalScoreContainer != null)
            {
                _globalScoreContainer.Update(gameTime);
            }

            if (_globalScoreIsLoaded && _globalScoreContainer == null)
            {
                _globalScoreContainer = new ScoreContainer(_globalScores,
                                                           CommonScreenTextConstants.Score.GlobalScores, false, new Rectangle(0, 0, _gameScreenManager.GameScreenWidth, _gameScreenManager.GameScreenHeight));
                _globalScoreContainer.LoadContent(_contentManager);
                _globalScoreContainer.Init();
            }
        }