Example #1
0
 // ----------------------------------------------------------------------------------------------------------------
 // Determines the appropriate response if a particular button has been pressed.
 private void determineResponse(bool isReplay)
 {
     if (chronometer != null)
     {
         chronometer.Stop();
         chronometer = null;
     }
     if (logic != null)
     {
         logic.deleteBoard();
         logic = null;
     }
     if (sensorOn)
     {
         sensorSwitch(false);
     }
     if (isReplay)
     {
         GlobalApp.BeginActivity(this, typeof(DiceRollsActivity), GlobalApp.getVariableDifficultyName(), Intent.GetIntExtra(GlobalApp.getVariableDifficultyName(), 1), GlobalApp.getVariableChoiceName(), Intent.GetIntExtra(GlobalApp.getVariableChoiceName(), 0));
     }
     else
     {
         GlobalApp.BeginActivity(this, typeof(GameMenuActivity), GlobalApp.getVariableChoiceName(), Intent.GetIntExtra(GlobalApp.getVariableChoiceName(), 0));
     }
 }
Example #2
0
 // ----------------------------------------------------------------------------------------------------------------
 // The game has ended so the score, and time will passed to userInputActivity.
 private void end()
 {
     try
     {
         chronometer.Stop();
         string playersScore = LeaderBoardInterface.formatLeaderBoardScore("", score.ToString(), Intent.GetIntExtra(GlobalApp.getVariableDifficultyName(), 1), chronometer.Text);
         GlobalApp.BeginActivity(this, typeof(UserInputActivity), GlobalApp.getPlayersScoreVariable(), playersScore,
                                 GlobalApp.getVariableChoiceName(), Intent.GetIntExtra(GlobalApp.getVariableChoiceName(), 0));
     }
     catch
     {
         GlobalApp.Alert(this, 0);
     }
 }