Draw() public method

public Draw ( PaintEventArgs pe ) : void
pe System.Windows.Forms.PaintEventArgs
return void
Exemplo n.º 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);
            }
        }