public void animationStep(int i) {
		for (duration += i; duration > animation.sequences
				.getFrameLength(elapsedFrames);) {
			duration -= animation.sequences.getFrameLength(elapsedFrames) + 1;
			elapsedFrames++;
			if (elapsedFrames >= animation.sequences.frameCount
					&& (elapsedFrames < 0 || elapsedFrames >= animation.sequences.frameCount)) {
				elapsedFrames = 0;
				transformationCompleted = true;
			}
		}

	}