void menuButtons_OnClick(Button sender, int playerIndex, TimeSpan time)
 {
     switch ((ExitButton)sender.Index)
     {
         case ExitButton.Exit:
             Game1.instance.ExitGame();
             break;
         case ExitButton.Back:
             ((TitleScreen)parent).SetPanel(MenuState.MainMenu);
             break;
     }
 }
 void menuButtons_OnClick(Button sender, int playerIndex, TimeSpan time)
 {
     switch (sender.Index)
     {
         case 0:
             DoUnpause();
             SleepwalkerGame.instance.ShowSignIn();
             break;
         case 1:
             DoUnpause();
             break;
     }
 }
 void menuButtons_OnClick(Button sender, int playerIndex, TimeSpan time)
 {
     switch ((ExitButton)sender.Index)
     {
         case ExitButton.Exit:
             SmuckGame.instance.ExitGame();
             break;
         case ExitButton.Back:
             SmuckGame.instance.ExitToMainMenu();
             break;
         case ExitButton.UnlockTrial:
             SmuckGame.instance.UnlockTrial(playerIndex);
             break;
     }
 }
 void menuButtons_OnClick(Button sender, int playerIndex, TimeSpan time)
 {
     switch ((NetworkButton)sender.Index)
     {
         case NetworkButton.Host:
             NetworkManager.Instance.CreateSession(NetworkSessionType.Local);
             if (NetworkManager.Session != null)
             {
                 ((StartScreen)parent).SetPanel(MenuState.Lobby, playerIndex);
             }
             break;
         case NetworkButton.Join:
             NetworkManager.Instance.JoinSession();
             if (NetworkManager.Session != null)
             {
                 ((StartScreen)parent).SetPanel(MenuState.Lobby, playerIndex);
             }
             break;
     }
 }
 void menuButtons_OnFocusChanged(Button sender)
 {
     stage.audio.PlaySound(Sfx.navigateSound);
 }
 void menuButtons_OnClick(Button sender, int playerIndex, TimeSpan time)
 {
     switch ((ExitButton)sender.Index)
     {
         case ExitButton.Exit:
             needsExitToMain = true;
             break;
         case ExitButton.Back:
             Unpause(this, null);
             break;
         case ExitButton.UnlockTrial:
             Unpause(this, null);
             SleepwalkerGame.instance.UnlockTrial();
             break;
     }
 }
 void menuButtons_OnClick(Button sender, int playerIndex, TimeSpan time)
 {
     MenuState ms = buttonTargets[sender.Index];
     ((StartScreen)parent).SetPanel(ms, playerIndex);
 }
        void endTrialButtons_OnClick(Button sender, int playerIndex, TimeSpan time)
        {
            endTrialButtons.Deactivate();
            switch (sender.Index)
            {
                case 0:
                    SmuckGame.instance.UnlockTrial(playerIndex);
                    break;

                case 1:
                    expiredState = ExpiredState.Ending;
                    videoName = "trialDecline";
                    Activate();
                    break;
            }
        }