Exemplo n.º 1
0
        private void Select4(object sender, EventArgs e)
        {
            //creates a new level 4 form when you select level 4 then closes the level select form
            Level4 Level_4 = new Level4();

            Level_4.Show();
            Level_4.Location = this.Location;
            Level_4.TopMost  = true;
            this.Close();
        }
Exemplo n.º 2
0
 private void KeyIsUp(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Left)
     {
         goLeft = false;
     }
     if (e.KeyCode == Keys.Right)
     {
         goRight = false;
     }
     if (jumping == true)
     {
         jumping = false;
     }
     if (e.KeyCode == Keys.Enter && isGameOver == true)
     {
         RestartGame();
     }
     // Go to level 4 When you win
     if (e.KeyCode == Keys.Enter && Win == true)
     {
         Level_4.Show();
         Level_4.Location = this.Location;
         Level_4.TopMost  = true;
         this.Close();
     }
     //press esc to get back to main menu
     if (e.KeyCode == Keys.Escape && Win == false)
     {
         MainMenu main = new MainMenu();
         main.Show();
         main.Location = this.Location;
         main.TopMost  = true;
         this.Close();
     }
 }