Пример #1
0
        private void doComputerMove()
        {
            DelayTimer waitTimer = new DelayTimer(this, 400);

            waitTimer.Elapsed += new ElapsedEventHandler(playComputerMove);
            if ((m_CurrentPlayer.AvailablePieces.Count > 0) && (m_GameOver == !v_GameIsOver))
            {
                waitTimer.Start();
            }
        }
Пример #2
0
        private void explodeAnimation(int i_Top, int i_Left)
        {
            DelayTimer timer     = new DelayTimer(this, 600);
            PictureBox explosion = new PictureBox();

            explosion.Top      = i_Top;
            explosion.Left     = i_Left;
            explosion.Image    = DamkaGraphics.explosion;
            explosion.Size     = new Size(k_TileWidth, k_TileHeight);
            explosion.SizeMode = PictureBoxSizeMode.StretchImage;
            this.Controls.Add(explosion);
            explosion.BringToFront();
            PictureBoxExplosions.AddLast(explosion);

            timer.Elapsed += new ElapsedEventHandler(remove_explosions);
            timer.Start();
        }