public void updateAnimation() {
		elapsedTime++;
		
		Frame currentFrame = frameList.get(currentIndex);
		if (elapsedTime > currentFrame.getEndTime() && currentIndex < maxIndex - 1) {
			currentIndex++;
		}
		
		if (elapsedTime > maxTime) {
			if (!looping) {
				for (AnimationObserver observer : observers) {
					observer.animationFinished(new AnimationEvent(this));
				}
			}
			else {
				elapsedTime = 0;
				currentIndex = 0;
			}
		}
	}