@Override
 public void execute() {
   if (!Variables.isDefined(SCORE_VARIABLE)) {
     Variables.setValue(SCORE_VARIABLE, 0);
   }
   int deltaScore = Integer.parseInt(params.get("value"));
   int resultingScore = addToScore(deltaScore);
   if (resultingScore == 0) {
     GeoQuestApp.showMessage(ctx.getText(R.string.scoreZero));
   } else if (deltaScore > 0) {
     // GeoQuestApp.playAudio(ResourceManager.POSITIVE_SOUND, false);
     GeoQuestApp.showMessage(ctx.getText(R.string.scoreIncreasedBy) + " " + deltaScore);
   } else if (deltaScore < 0) {
     // GeoQuestApp.playAudio(ResourceManager.NEGATIVE_SOUND, false);
     GeoQuestApp.showMessage(ctx.getText(R.string.scoreDecreasedBy) + " " + (-deltaScore));
   }
 }
Esempio n. 2
0
  /** starts the basic AR view */
  private void startARViewBasic() {

    // Create the basic intent
    if (wikitudeIntent == null) wikitudeIntent = prepareIntent();

    // And launch the intent
    try {
      GeoQuestApp.showMessage(getText(R.string.startingARView));
      wikitudeIntent.startIntent(this);
    } catch (ActivityNotFoundException e) {
      AbstractWikitudeARIntent.handleWikitudeNotFound(this);
    }
  }