Esempio n. 1
0
  private void displayCurrentStepMessage(boolean changeText) {
    final int step = mGameEngine.getCurrentStep();
    int stringId = -1;
    switch (step) {
      case GameInformationTutorial.STEP_WELCOME:
        stringId = R.string.tuto_step_welcome;
        break;
      case GameInformationTutorial.STEP_UI_WELCOME:
        stringId = R.string.tuto_step_ui_welcome;
        break;
      case GameInformationTutorial.STEP_CROSSHAIR:
        stringId = R.string.tuto_step_crosshair;
        break;
      case GameInformationTutorial.STEP_AMMO:
        stringId = R.string.tuto_step_ammos;
        break;
      case GameInformationTutorial.STEP_AMMO_2:
        stringId = R.string.tuto_step_ammos_2;
        break;
      case GameInformationTutorial.STEP_COMBO:
        stringId = R.string.tuto_step_combo;
        break;
      case GameInformationTutorial.STEP_SCORE:
        stringId = R.string.tuto_step_score;
        break;
      case GameInformationTutorial.STEP_SERIOUS_THINGS:
        stringId = R.string.tuto_step_serious_things;
        break;
      case GameInformationTutorial.STEP_TARGET:
        stringId = R.string.tuto_step_target;
        break;
      case GameInformationTutorial.STEP_TARGET_2:
        stringId = R.string.tuto_step_target_2;
        break;
      case GameInformationTutorial.STEP_KILL:
        stringId = R.string.tuto_step_kill;
        break;
      case GameInformationTutorial.STEP_KILL_2:
        stringId = R.string.tuto_step_kill_2;
        break;
      case GameInformationTutorial.STEP_CONGRATULATION:
        stringId = R.string.tuto_step_congratulation;
        break;
      case GameInformationTutorial.STEP_CONGRATULATION_2:
        stringId = R.string.tuto_step_congratulation_2;
        break;
      case GameInformationTutorial.STEP_END:
        stringId = R.string.tuto_step_end;
        break;
    }

    if (stringId != -1) {
      if (changeText) {
        mAnimationLayer.changeTextView(mTutoTextView, stringId);
      } else {
        mTutoTextView.setText(stringId);
        mAnimationLayer.showTextView(mTutoTextView);
      }
    }
  }
Esempio n. 2
0
  @Override
  public void onDrawing(Canvas c) {
    super.onDrawing(c);
    int step = mGameEngine.getCurrentStep();
    resetPainter();

    if (step >= GameInformationTutorial.STEP_CROSSHAIR) {
      drawCrossHair(c);
    }

    if (step >= GameInformationTutorial.STEP_COMBO) {
      drawCombo(c);
    }

    if (step >= GameInformationTutorial.STEP_AMMO) {
      drawAmmo(c);
    }

    if (step >= GameInformationTutorial.STEP_SCORE) {
      drawScore(c);
    }
  }