コード例 #1
0
 public void update() {
   if (isInMotion()) {
     Set<Motion> toRemove = new HashSet<Motion>();
     for (Motion m : tweens) {
       if (!m.isPlaying()) {
         if (m.getPosition() == 0) {
           m.play();
         } else {
           toRemove.add(m);
         }
       } else {
         m.update();
       }
     }
     for (Motion m : toRemove) {
       tweens.remove(m);
     }
   }
 }
コード例 #2
0
 public boolean isInMotion() {
   return !tweens.isEmpty();
 }