public void update(double deltaTime){
		if(animate){
			
			// Perform sprite animation:
			currentTime+=deltaTime;
			// If the time has passed time for next frame:
			if(currentTime > frameTime){
				// Find out how many frames have passed in this time:
				float frameAdvance = (float) Math.floor(currentTime/frameTime);
				// If this is greater than max frames, loop it around (use modulus to get real frame advance)
				int actualFrameAdvance = (int)frameAdvance%framesMap.size();
				// Set the frame to the correct frame according to actualFrameAdvance (use modulus to take into account looping past end)
				frame = (actualFrameAdvance+frame)%framesMap.size();
				// Carry over remaining time left:
				currentTime = currentTime%frameTime;
			}
			
			// Perform rotation:
			rz += (zRotationPerSecond/1000f)*deltaTime;
			// keep rz to within 0->360
			rz = (360+rz)%360;
		}
		
		// Perform a specific rotation (will be called from performRotation() method):
		if(performRotation){
			// If this image is not animated, have to do the rotation in here:
			if(!animate){
				// Perform rotation:
				rz += (zRotationPerSecond/1000f)*deltaTime;
				// keep rz to within 0->360
				rz = (360+rz)%360;
			}
			rotationSinceStart+=(Math.abs(zRotationPerSecond)/1000f)*deltaTime;
			if(rotationSinceStart>rotationNeeded){
				rz = rotationTarget;
				zRotationPerSecond = 0;
				rotationSinceStart = 0;
				performRotation = false;
			}
		}
		
		// Perform a scale operation:
		if(performScaling){
			// scaleTarget is how much scale needs to be increased by.
			float scaleChange = (float)((deltaTime/1000)/timeToScale)*scaleChangeNeeded;
			// Check to see if scale needs to be decreased or increased:
			if(getScale()<=scaleTarget){
				setScale(getScale() + scaleChange);
				if(getScale()>=scaleTarget){
					setScale(scaleTarget);
					performScaling = false;
				}
			}else{
				setScale(getScale() + scaleChange);
				if(getScale()<=scaleTarget){
					setScale(scaleTarget);
					performScaling = false;
				}
			}
		}
	}