function Fly() {
	this.obj = new FlyingObj();
	/* specifications: */
	this.hp;
	this.shotDamage;
	this.isFriendly;

	this.existedTime = 0;

	this.hitted = function(damage) {
		this.hp -= damage;
	}

	this.update = function() {
		this.obj.move(this.isFriendly);

		if (this.existedTime % 15 == 0) {
			this.fire();
		}

		this.existedTime++;
	}

	this.init = function() {
		this.obj.init();
	}

	this.fire = function() {
		this.middley = this.obj.y+(this.obj.img.height/2)-(shotImg.height/2);
		if (this.isFriendly) {
			this.shotx = this.obj.x + this.obj.img.width;
			this.playerShot();
		} else {
			var dirX = this.obj.dirX-2;
			this.shotx = this.obj.x;
			fireAShot(this.shotx, this.middley, dirX, 0, false);
		}
	}

	this.isDead = function() {
		if (this.hp <= 0) {
			return true;
		}
		return false;
	}
}

