예제 #1
0
        /// <summary>
        /// Paint event handler of picture box.
        /// Draws all sprites.
        /// </summary>
        private void GamePaint(object sender, PaintEventArgs args)
        {
            Graphics graphics = args.Graphics;

            _alien.Display(graphics);
            _ship.Display(graphics);
            foreach (Bomb bomb in _bombs)
            {
                bomb.Display(graphics);
            }
        }
예제 #2
0
        //#####################################################################
        //# Methods

        //#####################################################################
        //# Event Handlers
        private void _pictureBox_Paint(object sender, PaintEventArgs e)
        {
            Graphics paper = e.Graphics;

            _alien.Display(paper);
            _ship.Display(paper);
            foreach (Bomb bomb in _bombs)
            {
                bomb.Display(paper);
            }
        }