예제 #1
0
        private void pbGame_Paint(object sender, PaintEventArgs e)
        {
            Tetris.DrawGame(e.Graphics);

            if (Timer.Enabled)
            {
                //Display Apparition Block
                FreeBlock.DrawApparition(e.Graphics, FreeBlock.Apparition(Tetris.Grid));
                //DrawBlock
                FreeBlock.DrawBlock(e.Graphics);
            }
            else if (Timer.Enabled == false && lblGamePaused.Visible)
            {
                //Will still draw if game is paused
                FreeBlock.DrawApparition(e.Graphics, FreeBlock.Apparition(Tetris.Grid));
                FreeBlock.DrawBlock(e.Graphics);
            }
        }