Example #1
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            this.IsMouseVisible = true;

            backgroundColor = Color.Gray;

            simonPlayer = new SimonPlayer(PlayerIndex.One, new Vector2
                                              (this.GraphicsDevice.Viewport.Width * 0.05f, this.GraphicsDevice.Viewport.Height * 0.05f));
            simonPattern = new SimonPattern();

            base.Initialize();
        }
Example #2
0
        private void UpdateStartGame()
        {
            SimonStatus.IsGameFailed = false;

            simonPlayer.Score.Value = 0;

            simonPattern = new SimonPattern();

            SimonStatus.CurrentSequenceLength = 1;
            SimonStatus.CurrentPatternIndex   = 0;

            SimonStatus.DelayTime = 0;

            SimonStatus.StatusMessage = String.Empty;

            SimonStatus.IsSequencePlaying = true;
            SimonStatus.IsStarting        = true;

            SimonStatus.IsGameStarted = true;
        }