Пример #1
0
        private void ConcenReact_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.F5)
            {
                playerProfile.SaveProfile("");

                if (debugForm != null)
                {
                    debugForm.WriteLine("Gespeichert");
                }
            }

            if (e.KeyCode == Keys.U)
            {
                playerProfile.MainShopcurrency += 15;
            }
            if (newTick)
            {
                newTick = false;
                if (e.KeyCode != Keys.Escape)
                {
                    if (!inMainMenu)
                    {
                        mainGame.KeyHandler(e);
                    }
                    else
                    {
                        if (mainMenu.InVisualProfileEditor1)
                        {
                            ((VisualProfileEditorEntry)lastClickedEntry).KeyHandler(e, ((VisualProfileEditorEntry)lastClickedEntry));
                        }
                        else if (mainMenu.InVisualProfileLoading)
                        {
                            ((VisualProfileLoadingEntry)lastClickedEntry).KeyHandler(e, ((VisualProfileLoadingEntry)lastClickedEntry));
                        }
                        else
                        {
                            mainMenu.KeyHandler(e);
                        }
                    }
                }
                else
                {
                    Reset();
                }
            }
            //Tastendruck weiterreichen an die Spieleinstanz
        }
Пример #2
0
 private void ConcenReact_KeyDown(object sender, KeyEventArgs e)
 {
     //Tastendruck weiterreichen an die Spieleinstanz
     if (e.KeyCode != Keys.Escape)
     {
         if (!inMainMenu)
         {
             mainGame.KeyHandler(e.KeyCode);
         }
         else
         {
             mainMenu.KeyHandler(e.KeyCode);
         }
     }
     else
     {
         if (!inMainMenu)
         {
             Reset();
         }
     }
 }