import java.awt.image.BufferedImage;

public class UMA extends Animal {
	public UMA (int x, int y, boolean facingLeft) {
		super(x, y, "uma_frames.png", "uma.wav", facingLeft);

		animationWalkingFrames = new BufferedImage[walkingFrames_n];
		for (int j = 0; j < animationWalkingFrames.length; j++) {
			if (facingLeft) {
				animationWalkingFrames[j] = flipImageOverVertical(animalSheetBufferedImage.getSubimage(0 + 64 * j, 0 + 64 * 1, 64, 64));
			}
			else {
				animationWalkingFrames[j] = animalSheetBufferedImage.getSubimage(0 + 64 * j, 0 + 64 * 1, 64, 64);
			}
		}
		animationJumpingFrames = new BufferedImage[jumpingFrames_n];
		for (int j = 0; j < animationJumpingFrames.length; j++) {
			if (facingLeft) {
				animationJumpingFrames[j] = flipImageOverVertical(animalSheetBufferedImage.getSubimage(0 + 64 * j, 0 + 64 * 3, 64, 64));
			}
			else {
				animationJumpingFrames[j] = animalSheetBufferedImage.getSubimage(0 + 64 * j, 0 + 64 * 3, 64, 64);
			}
		}
		animationThrowingProjectileFrames = new BufferedImage[throwingProjectileFrames_n];
		for (int j = 0; j < animationThrowingProjectileFrames.length; j++) {
			if (facingLeft) {
				animationThrowingProjectileFrames[j] = flipImageOverVertical(animalSheetBufferedImage.getSubimage(0 + 64 * j, 0 + 64 * 5, 64, 64));
			}
			else {
				animationThrowingProjectileFrames[j] = animalSheetBufferedImage.getSubimage(0 + 64 * j, 0 + 64 * 5, 64, 64);
			}
		}
		animationFallingDownFrames = new BufferedImage[fallingDownFrames_n];
		for (int j = 0; j < animationFallingDownFrames.length; j++) {
			if (facingLeft) {
				animationFallingDownFrames[j] = flipImageOverVertical(animalSheetBufferedImage.getSubimage(0 + 64 * j, 0 + 64 * 4, 64, 64));
			}
			else {
				animationFallingDownFrames[j] = animalSheetBufferedImage.getSubimage(0 + 64 * j, 0 + 64 * 4, 64, 64);
			}
		}
		animationStandingFrames = new BufferedImage[standingFrames_n];
		for (int j = 0; j < animationStandingFrames.length; j++) {
			if (facingLeft) {
				animationStandingFrames[j] = flipImageOverVertical(animalSheetBufferedImage.getSubimage(0 + 64 * j, 0 + 64 * 0, 64, 64));
			}
			else {
				animationStandingFrames[j] = animalSheetBufferedImage.getSubimage(0 + 64 * j, 0 + 64 * 0, 64, 64);
			}
		}
		animationPunchingFrames = new BufferedImage[punchingFrames_n];
		for (int j = 0; j < animationPunchingFrames.length; j++) {
			if (facingLeft) {
				animationPunchingFrames[j] = flipImageOverVertical(animalSheetBufferedImage.getSubimage(0 + 64 * j, 0 + 64 * 9, 64, 64));
			}
			else {
				animationPunchingFrames[j] = animalSheetBufferedImage.getSubimage(0 + 64 * j, 0 + 64 * 9, 64, 64);
			}
		}
		animationLowKickingFrames = new BufferedImage[lowKickingFrames_n];
		for (int j = 0; j < animationLowKickingFrames.length; j++) {
			if (facingLeft) {
				animationLowKickingFrames[j] = flipImageOverVertical(animalSheetBufferedImage.getSubimage(0 + 64 * j, 0 + 64 * 10, 64, 64));
			}
			else {
				animationLowKickingFrames[j] = animalSheetBufferedImage.getSubimage(0 + 64 * j, 0 + 64 * 10, 64, 64);
			}
		}
		animationHighKickingFrames = new BufferedImage[highKickingFrames_n];
		for (int j = 0; j < animationHighKickingFrames.length; j++) {
			if (facingLeft) {
				animationHighKickingFrames[j] = flipImageOverVertical(animalSheetBufferedImage.getSubimage(0 + 64 * j, 0 + 64 * 11, 64, 64));
			}
			else {
				animationHighKickingFrames[j] = animalSheetBufferedImage.getSubimage(0 + 64 * j, 0 + 64 * 11, 64, 64);
			}
		}
		animalBufferedImage = animationStandingFrames[0];

		if (facingLeft) animalBufferedImage = flipImageOverVertical(animalBufferedImage);
		
		if (facingLeft) {
			centerOffset = new Point[3];
			radius = new int[3];

			centerOffset[0] = new Point(128 - (30*2), 32*2);
			centerOffset[1] = new Point(128 - (31*2), 43*2);
			centerOffset[2] = new Point(128 - (31*2), 52*2);

			radius[0] = 8*2;
			radius[1] = 7*2;
			radius[2] = 5*2;

			punchOffset = new Point (128 - (41*2) - 7, 40*2 + 1);
			punchRadius = 8;

			lowKickOffset = new Point(128 - 41*2 - 5, 46*2 + 4);
			lowKickRadius = 8;

			highKickOffset = new Point(128 - 41*2 - 5, 37*2 + 4);
			highKickRadius = 8;
		}
		else {
			centerOffset = new Point[3];
			radius = new int[3];
			
			centerOffset[0] = new Point(30*2 , 32*2);
			centerOffset[1] = new Point(31*2 , 43*2);
			centerOffset[2] = new Point(31*2 , 52*2);
			
			radius[0] = 8*2;
			radius[1] = 7*2;
			radius[2] = 5*2;
			
			punchOffset = new Point(41*2, 40*2);
			punchRadius = 8;
			
			lowKickOffset = new Point(42*2 - 1, 47*2 + 1);
			lowKickRadius = 8;
			
			highKickOffset = new Point(43*2, 37*2);
			highKickRadius = 8;
		}
	}
}