Esempio n. 1
0
  // Major control
  private void startTransit(int to) {
    updateInfo(transitor);

    lastActive = active;
    active = to;
    transiting = true;
    transitStartTime = GameTimer.getAbsTime();
  }
Esempio n. 2
0
  // Transition page
  private void updateTransit() {
    deltaTime = GameTimer.getAbsTime() - transitStartTime;

    transitProgress = (double) deltaTime / TRANSIT_TIME;
    if (transitProgress > 1) {
      transitProgress = 1;
    }

    for (int i = 0; i < 4; ++i) {
      Widget page = get(transitor, i);
      getPage(page).updatePosition();
    }

    if (transitProgress == 1) {
      transiting = false;
      finishTransit();
    }
  }