script_enemy_main
{//Enemy00
        let count=0;
        let cx=GetCenterX();
        let cy=GetCenterY();
        let csd=GetCurrentScriptDirectory;
        let imgBoss2=csd~"img\dot_yousei3.png";
        let imgBoss3=csd~"img\familiar.png";
	let imgAngle=0;
	let imgAlpha=0;
	let imgAlpha2=0;

	@Initialize {
	SetLife(1);
	SetScore(0);
	SetDamageRate(0,0);
	SetX(GetX);
	SetY(GetY);
	LoadGraphic(imgBoss2);
	LoadGraphic(imgBoss3);
	LoadUserShotData(csd~"img\PLUS_shot.txt");
	CreateEnemyFromScript("DOLL",GetX,GetY,0,0,0);
	}

	@MainLoop {
	if(count<=50){
		imgAngle+=6;
		imgAlpha+=5;
		imgAlpha2+=5;
		if(imgAngle>=360){imgAngle=0;}
		}
	if(count>50&&count<=101){
		imgAngle+=6;
		imgAlpha-=5;
		if(imgAngle>=360){imgAngle=0;}
		}
	if(count>101&&count<=152){
		imgAlpha2-=5;
		}
        if(count>=153)
        	{
        	VanishEnemy();
        	}
	count++;
	}

        @DrawLoop {
		SetTexture(imgBoss3);
		SetGraphicAngle(0,0,imgAngle);
		SetAlpha(imgAlpha);
		SetGraphicRect(0,0,48,48);
		DrawGraphic(GetX(),GetY());
		SetGraphicAngle(0,0,-imgAngle);
		SetGraphicRect(0,0,48,48);
		DrawGraphic(GetX(),GetY());
		SetTexture(imgBoss2);
		SetGraphicAngle(0,0,0);
		SetAlpha(imgAlpha2);
		SetGraphicRect(261,0,282,31);
		DrawGraphic(GetX(),GetY());
	}

        @Finalize{
        }
}

script_enemy DOLL{
        let count=0;
        let cx=GetCenterX();
        let cy=GetCenterY();
        let csd=GetCurrentScriptDirectory;
        let imgBoss2=csd~"img\dot_yousei3.png";
	let imgAngle2=0;
	let imgAlpha2=0;
	let deathse=csd~"se\Hitugi.wav";

	@Initialize {
	SetLife(1);
	SetScore(0);
	SetDamageRateEx(0,0,0,0);
	SetX(GetX);
	SetY(GetY);
	}

	@MainLoop {
	if(count<=50){
		imgAlpha2+=5;
		}
	if(count==102){
		SetMovePositionHermite(GetX-40,GetY-30,60,225,10,90,51);
		PlaySE(deathse);
        	SetShotDirectionType(PLAYER);
		let i=0;
		while(i<40){
			let shotA=0;
			CreateShotA(shotA,GetX,GetY,0);
			SetShotDataA(shotA,0,4,i*9,0,-0.1,1,41);
			FireShot(shotA);
			i++;
			}
		}
	if(count>101&&count<=152){
		imgAngle2+=4;
		if(imgAngle2>=90){imgAngle2=90;}
		imgAlpha2-=5;
		}
        if(count>=153)
        	{
        	VanishEnemy();
        	}
	count++;
	}

        @DrawLoop {
		SetTexture(imgBoss2);
		SetGraphicAngle(imgAngle2,imgAngle2,0);
		SetAlpha(imgAlpha2);
		SetGraphicRect(229,0,250,31);
		DrawGraphic(GetX(),GetY());
	}

        @Finalize
        {
        }
}