예제 #1
0
파일: Widget.java 프로젝트: lcy03406/amber
  public void tick(double dt) throws InterruptedException {
    Widget next;

    for (Widget wdg = child; wdg != null; wdg = next) {
      next = wdg.next;
      wdg.tick(dt);
    }
    /* It would be very nice to do these things in harmless mix-in
     * classes, but alas, this is Java. */
    anims.addAll(nanims);
    nanims.clear();
    for (Iterator<Anim> i = anims.iterator(); i.hasNext(); ) {
      Anim anim = i.next();
      if (anim.tick(dt)) i.remove();
    }
  }
 @Override
 public void paint(Graphics g, vector v) {
   if (on) {
     super.paint(g, v);
   }
   if (lastChangedAt + staticTfb < GameTime.getTime()) {
     on = !on;
     lastChangedAt = GameTime.getTime();
   }
 }