示例#1
0
        private void Form1_KeyDown(object sender, KeyEventArgs e)
        {
            // God Mode
            if (e.KeyCode == Keys.G)
            {
                if (GodMode == false)
                {
                    GodMode = true;
                }
                else
                {
                    GodMode = false;
                    GodModeLabel.Hide();
                }
            }

            // Escape
            if (e.KeyCode == Keys.Escape)
            {
                Close();
            }

            // Pause
            if (e.KeyCode == Keys.Space)
            {
                if (isPaused == false)
                {
                    isPaused = true; // Pause: ON
                    PausedLabel.Show();
                    Time.Stop();
                }
                else
                {
                    isPaused = false;  // Pause: OFF
                    PausedLabel.Hide();
                    Time.Start();
                }
            }
        }
示例#2
0
 void HideLabels()
 {
     GodModeLabel.Hide();
     Cursor.Hide();
     PausedLabel.Hide();
 }