示例#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);
            }
        }
示例#2
0
 private void pbExtras_Paint(object sender, PaintEventArgs e)
 {
     NextBlock.DrawBlock(e.Graphics, 0, 0);
 }