예제 #1
0
  // Major control
  private void startTransit(int to) {
    updateInfo(transitor);

    lastActive = active;
    active = to;
    transiting = true;
    transitStartTime = GameTimer.getAbsTime();
  }
예제 #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();
    }
  }
예제 #3
0
 final long getDeltaTime() {
   return GameTimer.getTime() - createTime;
 }
예제 #4
0
 public State(boolean _handlesKey) {
   handlesKey = _handlesKey;
   createTime = GameTimer.getTime();
 }