public SpriteAnimation(ArrayList<BufferedImage> sprites, BufferedImage gun, double indexIncrement)
	{
		// we make a deep copy here so we can simply swap references of arrays when we want to switch directions.
		this.sprites = this.spritesRight = sprites;
		this.spritesLeft = new ArrayList<>();
		this.gun = gun;
		
		// Add a mirrored version for switching directions.
		for(BufferedImage b : sprites)
			spritesLeft.add(mirror(b));
		
		this.indexIncrement = indexIncrement;
		currentIndex = 0;
	}