package pnf;

import java.util.Random;

import javax.swing.ImageIcon;

public class Zombles {
	/**僵尸数组*/
	static ImageIcon[] js = new ImageIcon[6];
	static ImageIcon[] js_1 = new ImageIcon[6];
	ImageIcon rjs;
	int ij;
	/**属性*/
	int w,h;
	/**血量*/
	int blood;
	static int bx;
	/**坐标*/
	int x;
	static int[] y = new int[5];
	int iy,ry;
	/**僵尸速度*/
	int speed,s;
	static {
		for (int i = 0; i < y.length; i++) {
			y[i] = 191+i*100;
		}
		for (int i = 0; i < js.length; i++) {
			js[i] = new ImageIcon("lib/js"+(i+1)+".gif");
		}
//		for (int i = 0; i < js.length; i++) {
//			js_1[i] = new ImageIcon("lib/js"+(i+1)+"_1.gif");
//		}
	}
	
	public Zombles() {//随机僵尸种类,位置
		Random r = new Random();
		ij = r.nextInt(js.length);
		rjs = js[ij];
		blood = (ij+1)*10;
		w = rjs.getIconWidth();
		h = rjs.getIconHeight();
		iy = r.nextInt(y.length);
		ry = y[iy];
		speed = r.nextInt(4)+1;
		s = speed;
		x = 1200;
	}
	/**僵尸行走*/
	public void step(){
		x -= speed;
	}
}