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;
     }
 }
Ejemplo n.º 2
0
 void menuButtons_OnClick(Button sender, int playerIndex, TimeSpan time)
 {
     switch (sender.Index)
     {
         case 0:
             DoUnpause();
             SleepwalkerGame.instance.ShowSignIn();
             break;
         case 1:
             DoUnpause();
             break;
     }
 }
Ejemplo n.º 3
0
 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;
     }
 }
Ejemplo n.º 5
0
 void menuButtons_OnFocusChanged(Button sender)
 {
     stage.audio.PlaySound(Sfx.navigateSound);
 }
Ejemplo n.º 6
0
 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;
     }
 }
Ejemplo n.º 7
0
 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;
            }
        }