Beispiel #1
0
        /// <summary>
        /// Method to initialize all the member variabless
        /// </summary>
        private void InitGame()
        {
            timerDraw.Enabled  = true;
            timerDraw.Interval = Constants.TIMER_60_FPS;
            OpenPreviousGame();
            this.DoubleBuffered  = true;
            this.KeyPreview      = true;
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            this.MaximizeBox     = false;
            this.ballsDraw       = new Timer();
            ballsDraw.Interval   = 28;
            ballsDraw.Tick      += new EventHandler(timerDraw_Tick);
            ballsDraw.Start();
            hitSoundPlayer          = new SoundPlayer(Properties.Resources.hitSound);
            powerUpSoundPlayer      = new SoundPlayer(Properties.Resources.powerUpSound);
            Constants.WINDOW_HEIGHT = this.Height;
            Constants.WINDOW_WIDTH  = this.Width;

            ballBrush = new SolidBrush(Color.White);
            ballStart = new Balls.BallStart();
            _balls    = new Balls.Balls(0, Color.Black, 0, ballStart);

            // Sets score to 0 and all other multipliers to 1.

            /*
             *      NewGameStats();
             *
             *      powerups = new List<int>();
             *
             *      scoreMultiplierLabel.Text = "";
             *      damageMultiplierLabel.Text = "";
             *      ballMultiplierLabel.Text = "";
             *      scoreLabel.Text = "Score: 0";
             */

            konami = new KonamiSequence();
        }