コード例 #1
0
        /// <summary>
        /// Load graphics content for the screen.
        /// </summary>
        public override void LoadContent()
        {
            this._content            = new ContentManager(this.ScreenManager.Game.Services, "Content");
            this._spriteBatch        = this.ScreenManager.SpriteBatch;
            this._nintendoController = new NintendoController(this.ScreenManager.Game);

            _miniGameTimer = new QuizTimer(new TimeSpan(0, 1, 0));
            _miniGameTimer.LoadContent(ScreenManager.Font, Content, ScreenManager.GraphicsDevice);
            _miniGameTimer.TimeLocation = new Vector2(30, -5);

            base.LoadContent();
        }
コード例 #2
0
        /// <summary>
        /// Load graphics content for the screen.
        /// </summary>
        public override void LoadContent()
        {
            base.LoadContent();

            Question[] questions = Content.Load <Question[]>("Data/QuizGameQuestions");
            _correctSound        = Content.Load <SoundEffect>(Constants.SOFTPRODOLLAR_SOUND);
            _incorrectSound      = Content.Load <SoundEffect>("Audio/Effects/Doh");
            _correctAnswerPoints = this.ScreenManager.PointManager.GetValue(Constants.QUIZ_CORRECT_ANSWER);
            _incorrectAnswerTime = new TimeSpan(0, 0, this.ScreenManager.PointManager.GetValue(Constants.QUIZ_INCORRECT_ANSWER));

            _questions = ShuffleAndTrimQuestions(questions.ToList());

            SetupNextQuestion();

            // PLayer doesn't exist yet, so defaulting to one minute, will adjust later if needed
            _quizTimer = new QuizTimer(new TimeSpan(0, 1, 0));

            _quizTimer.LoadContent(ScreenManager.Font, Content, ScreenManager.GraphicsDevice);
        }