public BufferedImage getImage(int animation){
		if(this.animation != animation){
			this.animation = animation;
			index = 0;
			lastChange = System.currentTimeMillis();
		} else if(System.currentTimeMillis() > lastChange + delay[animation]){
			lastChange += delay[animation];
			index = (index + 1) % length[animation];
		}
		return images[animation][index];
	}