function fam(x,y,life,size,type,collision){
	let obj = ObjEnemy_Create(OBJ_ENEMY);
	let shot;
	let c = 0;
	ObjEnemy_Regist(obj);
	ObjMove_SetPosition(obj,x,y);
	ObjEnemy_SetLife(obj,life);
	ObjEnemy_SetDamageRate(obj,100,100);
	Control;
	DrawFam(1);
	return obj;
		task Control{	
			while(!Obj_IsDeleted(obj) && !Obj_IsDeleted(objBoss)){
			c++;
			ObjRender_SetY(obj,ObjMove_GetY(obj)+0.1*sin(c*5));
			if(ObjEnemy_GetInfo(obj,INFO_LIFE) <=0){
			PlaySound("Enep1",95,0);
			TExplosionA(ObjMove_GetX(obj),ObjMove_GetY(obj),10,0.3);
			Obj_Delete(obj);
			}
			if(ObjMove_GetX(obj)<-64 || ObjMove_GetX(obj)>640+64 || ObjMove_GetY(obj)<-64 || ObjMove_GetY(obj)>480+64 && collision == true){
			Obj_Delete(obj);
			}
			if(collision==true){ObjEnemy_SetIntersectionCircleToShot(obj,ObjMove_GetX(obj),ObjMove_GetY(obj),18);
			ObjEnemy_SetIntersectionCircleToPlayer(obj,ObjMove_GetX(obj),ObjMove_GetY(obj),12);}
			yield;
			}
			Obj_Delete(obj);
		}
		task DrawFam(p){
			let fam=ObjPrim_Create(OBJ_SPRITE_2D);
			let img=GCSD~"img/enemy.png";
			ObjPrim_SetTexture(fam,img);
			ObjSprite2D_SetSourceRect(fam,0+32*type,256,32+32*type,288);
			ObjRender_SetPosition(fam,x,y,0);
			ObjRender_SetScaleXYZ(fam,size*0.6,size*0.6,0);
			ObjSprite2D_SetDestCenter(fam);
			ObjRender_SetBlendType(fam,BLEND_ALPHA);
			Obj_SetRenderPriorityI(fam,33);
				let m1 = DrawCircle;
				let m2 = DrawDot(1);
				let m3 = DrawDot(-1);
				while(!Obj_IsDeleted(obj) && !Obj_IsDeleted(objBoss)){
				ObjRender_SetPosition(fam,ObjRender_GetX(obj),ObjRender_GetY(obj),0);
				ObjRender_SetPosition(m1,ObjRender_GetX(obj),ObjRender_GetY(obj),0);
				ObjRender_SetPosition(m2,ObjRender_GetX(obj),ObjRender_GetY(obj),0);
				ObjRender_SetPosition(m3,ObjRender_GetX(obj),ObjRender_GetY(obj),0);
				yield;
				}
						descent(i in 0..15){
						if(Obj_IsDeleted(objBoss)){break;}
						ObjRender_SetAlpha(fam,i*16);
						ObjRender_SetColor(fam,i*16,i*16,i*16);
						ObjRender_SetAlpha(m1,i*16);
						ObjRender_SetColor(m1,i*16,i*16,i*16);
						ObjRender_SetAlpha(m2,i*16);
						ObjRender_SetColor(m2,i*16,i*16,i*16);
						ObjRender_SetAlpha(m3,i*16);
						ObjRender_SetColor(m3,i*16,i*16,i*16);
						wait(1);
						}
						Obj_Delete(fam);
						Obj_Delete(m1);
						Obj_Delete(m2);
						Obj_Delete(m3);
				function DrawCircle{
						let cir=ObjPrim_Create(OBJ_SPRITE_2D);
						let img=GCSD~"img/enemy.png";
						ObjPrim_SetTexture(cir,img);
						ObjSprite2D_SetSourceRect(cir,0+32*type,288,32+32*type,320);
						ObjRender_SetPosition(cir,x,y,0);
						ObjRender_SetScaleXYZ(cir,size*1.5,size*1.5,0);
						ObjSprite2D_SetDestCenter(cir);
						ObjRender_SetBlendType(cir,BLEND_ALPHA);
						Obj_SetRenderPriorityI(cir,32);
						return cir;
				}
				function DrawDot(way){
						let dot=ObjPrim_Create(OBJ_SPRITE_2D);
						let img=GCSD~"img/enemy.png";
						ObjPrim_SetTexture(dot,img);
						ObjSprite2D_SetSourceRect(dot,128+32*type,288,160+32*type,320);
						ObjRender_SetPosition(dot,x,y,0);
						ObjRender_SetScaleXYZ(dot,size*1.45+way*0.25,size*1.45+way*0.25,0);
						ObjSprite2D_SetDestCenter(dot);
						ObjRender_SetBlendType(dot,BLEND_ALPHA);
						Obj_SetRenderPriorityI(dot,32);
						RLoop;
						return dot;
							task RLoop{
							while(!Obj_IsDeleted(obj) && !Obj_IsDeleted(objBoss)){
							ObjRender_SetPosition(dot,ObjRender_GetX(obj),ObjRender_GetY(obj),0);
							ObjRender_SetAngleZ(dot,c*(5.5-way)*way);
							yield;
							}
							}
				}
			}
	}