public Enemy(int type, int rank) {

		ImageIcon i = new ImageIcon(this.getClass().getResource(zmbDown));
		zombieDownImage = i.getImage();
		ImageIcon i2 = new ImageIcon(this.getClass().getResource(zmbDown2));
		zombieDownImage2 = i2.getImage();
		ImageIcon i1 = new ImageIcon(this.getClass().getResource(zmbUp));
		zombieUpImage = i1.getImage();
		ImageIcon i11 = new ImageIcon(this.getClass().getResource(zmbUp2));
		zombieUpImage2 = i11.getImage();

		ImageIcon i3 = new ImageIcon(this.getClass().getResource(zmbRight));
		zombieRightImage = i3.getImage();
		ImageIcon i33 = new ImageIcon(this.getClass().getResource(zmbRight2));
		zombieRightImage2 = i33.getImage();
		ImageIcon i4 = new ImageIcon(this.getClass().getResource(zmbLeft));
		zombieLeftImage = i4.getImage();
		ImageIcon i44 = new ImageIcon(this.getClass().getResource(zmbLeft2));
		zombieLeftImage2 = i44.getImage();
		
		ImageIcon zdu = new ImageIcon(this.getClass().getResource(zmbDemonUp));
		zombieDemonUpImage = zdu.getImage();
		ImageIcon zdu2 = new ImageIcon(this.getClass().getResource(zmbDemonUp2));
		zombieDemonUpImage2 = zdu2.getImage();
		ImageIcon zdd = new ImageIcon(this.getClass().getResource(zmbDemonDown));
		zombieDemonDownImage = zdd.getImage();
		ImageIcon zdd2 = new ImageIcon(this.getClass().getResource(zmbDemonDown2));
		zombieDemonDownImage2 = zdd2.getImage();
		
		ImageIcon zdl2 = new ImageIcon(this.getClass().getResource(zmbDemonLeft2));
		zombieDemonLeftImage2 = zdl2.getImage();
		ImageIcon zdl = new ImageIcon(this.getClass().getResource(zmbDemonLeft));
		zombieDemonLeftImage = zdl.getImage();
		
		ImageIcon zdr2 = new ImageIcon(this.getClass().getResource(zmbDemonRight2));
		zombieDemonRightImage2 = zdr2.getImage();
		ImageIcon zdr = new ImageIcon(this.getClass().getResource(zmbDemonRight));
		zombieDemonRightImage = zdr.getImage();
		
		currentframe = 0;
		spriteTimer = System.nanoTime();
		spriteDelay = 234;
		
		imageHeight = zombieDownImage.getHeight(null);
		imageWidth = zombieDownImage.getWidth(null);


		this.type = type;
		this.rank = rank;

		//basic enemy
		if (type == 1) {
			//color1 = Color.BLUE;
			if (rank == 1) {
				speed = 1;
				r = 25;
				health = 1;
			}
			if (rank == 2) {
				speed = 2;
				r = 25;
				health = 2;
			}
		}
		
		//zombie demon
		if (type == 2){
			if (rank == 1){
				speed = 2;
				health = 3;
			}
			if (rank == 2){
				speed = 3;
				health = 3;
			}
		}
		//basic enemy upgraded
		

		x = Math.random() * GamePanel.WIDTH / 2 + GamePanel.WIDTH / 4;
		y = -r;

		double angle = Math.random() * 140 + 20;
		rad = Math.toRadians(angle);

		movementAngle = rad;

		dx = Math.cos(rad) * speed / 2;
		dy = Math.sin(rad) * speed / 2;

		ready = false;
		dead = false;
	}