BattleShip.GameOver.Draw C# (CSharp) Метод

Draw() публичный Метод

public Draw ( PaintEventArgs pe ) : void
pe System.Windows.Forms.PaintEventArgs
Результат void
        public void Draw(PaintEventArgs pe)
        {
            this.CreateCendre();

            foreach (Cendre c in this.Cendres)
            {
                c.OnPaint(pe);
            }
        }
        #endregion

Usage Example

Пример #1
0
        /// <summary>
        /// Display each platform + ship
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Form1_Paint(object sender, PaintEventArgs e)
        {
            platAlly.Display(e);
            platEnemy.Display(e);


            foreach (Ship ship in ships)
            {
                ship.drawShip(e.Graphics);
            }

            /*if (!gameInProgress)
             * {
             *  foreach (Cendre c in cendres)
             *  {
             *      c.OnPaint(e);
             *  }
             * }*/

            if (gameover != null)
            {
                gameover.Draw(e);
            }
        }