Пример #1
0
        /// <summary>
        /// Loads the content for this screen.
        /// </summary>
        /// <param name="content">The content manager to load from.</param>
        public void LoadContent(ContentManager content)
        {
            _screenDescWon = content.Load <SpriteDescriptorTemplate>("Sprites/EndingWinScreen").Create();
            _screenDescWon.GetSprite <TextSprite>("Ending").Text  = Resources.EndingWinText;
            _screenDescWon.GetSprite <TextSprite>("Prompt1").Text = Resources.EndingPrompt1;
            _screenDescWon.GetSprite <TextSprite>("Prompt2").Text = Resources.EndingPrompt2;

            _screenDescLost = content.Load <SpriteDescriptorTemplate>("Sprites/EndingLoseScreen").Create();
            _screenDescLost.GetSprite <TextSprite>("Ending").Text    = Resources.EndingLostText;
            _screenDescLost.GetSprite <TextSprite>("Prompt1").Text   = Resources.EndingPrompt1;
            _screenDescLost.GetSprite <TextSprite>("Prompt2").Text   = Resources.EndingPrompt2;
            _screenDescLost.GetSprite <TextSprite>("TimerInfo").Text = Resources.EndingTimerInfo;

            _effectWon  = content.Load <SoundEffect>("Sounds/GameWon");
            _effectLost = content.Load <SoundEffect>("Sounds/GameLost");

            _transitionScreen           = new TransitionScreen();
            _transitionScreen.FadeColor = Color.Black;
            _transitionScreen.LoadContent(content);
        }
Пример #2
0
        /// <summary>
        /// Loads the content for the game.
        /// </summary>
        public void LoadContent(ContentManager content)
        {
            _badges    = new Badges();
            _badgeView = new BadgeView(_badges);
            _badgeView.LoadContent(content);

            _options = new Options();

            _storeScreen = new StoreScreen(_context);
            _storeScreen.LoadContent(content);

            _transitionScreen = new TransitionScreen();
            _transitionScreen.LoadContent(content);

            _endScreen = new GameOverScreen(_context);
            _endScreen.LoadContent(content);

            _pauseScreen = new PauseMenuScreenFactory().Create(_options, _badges, _context, content);

            _oceanSong = content.Load <Song>("Sounds/Ocean");
            MediaPlayer.IsRepeating = true;

            StartGame(content);
        }