public synchronized void update(long elapsedTime) {
		if (frames.size() > 1) {
			animTime += elapsedTime;
			if (animTime >= totalDuration) {
				animTime = animTime % totalDuration;
				currentFrame = 0;
			}
			while (animTime > getFrame(currentFrame).endTime) {
				currentFrame++;
			}
		}
	}