Beispiel #1
0
 public void way(boolean isWay) {
   if (backgroud != null) {
     backgroud.setCurrentTileIndex(isWay ? 1 : 0);
     if (isWay) {
       handler.sendEmptyMessageAtTime(0, 500);
     }
   }
 }
Beispiel #2
0
 public void clear(Scene scene) {
   type = -1;
   isChecked = false;
   if (sprite != null) {
     sprite.setCurrentTileIndex(3, 1);
   }
   update(scene);
 }
Beispiel #3
0
  public void update(Scene getmMainScene) {
    if (sprite != null) {
      if (getType() == -1) {
        sprite.stopAnimation();
        sprite.setCurrentTileIndex(2, 0);
      } else if (isBig()) {
        if (isChecked()) {
          sprite.setCurrentTileIndex(0, getType());
          sprite.animate(
              new long[] {100, 100, 100}, (getType() - 1) * 3, (getType() - 1) * 3 + 2, true);
        } else {
          sprite.stopAnimation();
          sprite.setCurrentTileIndex(0, getType() - 1);
        }

      } else {
        sprite.stopAnimation();
        sprite.setCurrentTileIndex(1, (getType() / 10) - 1);
      }
    }
  }