Example #1
0
 private void Application_WindowResize(Workbook Wb, Window Wn)
 {
     if (GameTimer.Enabled)
     {
         GameTimer.Enabled = false;
     }
     Wplane.Show(CurrentBlock.BlockWidth);
     CurrentBlock.SetNewCoordination((CurrentBlock.X / CurrentBlock.BlockWidth) * Gwidth,
                                     (CurrentBlock.Y / CurrentBlock.BlockWidth) * Gwidth);
     CurrentBlock.Blockwidth = Gwidth;
     CurrentBlock.Show();
 }
Example #2
0
 private int Wplane_GameFailed(int Args)
 {
     MessageBox.Show("You lost and the score is " + Score.ToString());
     foreach (Shape s in this.GameSheet.Shapes)
     {
         s.Delete();
     }
     Wplane            = new GamePlane(GameSheet, RowNum, ColNum);
     this.CurrentBlock = new Gameblock(GameSheet, ColNum / 2 * Gwidth, -1 * Gwidth, Gwidth, 1, 1);
     Wplane.Show();
     CurrentBlock.Show();
     return(Args);
 }