
class AnimationList {
  private ArrayList animations;

  public AnimationList() {
    animations = new ArrayList();
  }

  public void add( Animation animation ) {
    animations.add( animation );
  }

  public boolean remove( Animation animation ) {
    return animations.remove( animation );
  }

  public void reset() {
    for ( int i=0; i<animations.size(); i++ )
      ((Animation) animations.get( i )).reset();
  }

  public void animate( double secs ) {
    for ( int i=0; i<animations.size(); i++ )
      ((Animation) animations.get( i )).animate( secs );
  }
}
