public Pedestrian(int x, int y, int walktype) {
		this.walktype = walktype;
		i = 0; minus = 1;
		switch (walktype) {
		case GO_LEFT:
			speedX = DEFAULT_SPEED_LEFT;
			speedY = 0;
			break;
		case GO_RIGHT:
			speedX = DEFAULT_SPEED_RIGHT;
			speedY = 0;
			break;
		case GO_UP:
			speedX = 0;
			speedY = DEFAULT_SPEED_UP;
			break;
		case GO_DOWN:
			speedX = 0;
			speedY = DEFAULT_SPEED_DOWN;
			break;

		}
		rect = new Rectangle(x, y, DEFAULT_WIDTH, DEFAULT_HEIGHT);
		time = 0;
		waitToCross = false;
		crossed = false;
		crossing = false;
		finish = false;
	}