script_enemy_main
{//Enemy00
        let count=0;
        let cx=GetCenterX();
        let cy=GetCenterY();
        let csd=GetCurrentScriptDirectory;
        let imgEnemy=csd~"img\dot_kedama.png";
	let imgAngle=0;
	let imgAlpha=0;
	let imgAlpha2=0;
	let angle=GetArgument;
	let shotse=csd~"se\ShotSE02.wav";

	@Initialize {
        SetLife(25);
        SetScore(10);
        SetDamageRate(100,100);
        SetAngle(GetAngle);
        SetSpeed(GetSpeed);
        SetInvincibility(50);
	LoadGraphic(imgEnemy);
	LoadUserShotData(csd~"img\PLUS_shot.txt");
	}

	@MainLoop{
		imgAngle+=4;
		if(imgAngle>360){imgAngle=0;}
	if(count<=50){imgAlpha+=5;}
	if(count>=60&&count<=260&&count%10==0){
		PlaySE(shotse);
        	SetShotDirectionType(PLAYER);
        		let i=0;
        		while(i<8)
        		{
        		let shot01=1;
        		CreateShotA(shot01,GetX(),GetY(),10);
        		SetShotDataA(shot01,0,5,i*45,0,-0.01,1.5,1);
        		FireShot(shot01);
        		i++;
        		}
		}
	if(count>=60&&count<=260&&count%10==5){
		PlaySE(shotse);
        	SetShotDirectionType(PLAYER);
        		let i=0;
        		while(i<8)
        		{
        		let shot01=1;
        		CreateShotA(shot01,GetX(),GetY(),10);
        		SetShotDataA(shot01,0,5,i*45+22.5,0,-0.01,1.5,1);
        		FireShot(shot01);
        		i++;
        		}
		}
        if(GetX<-10||GetX>458||GetY>490||GetY<-10){
        		VanishEnemy();
        	}
        SetCollisionA(GetX(),GetY(),10);
        SetCollisionB(GetX(),GetY(),10);
        count++;
	}

        @DrawLoop {
		SetGraphicRect(54,0,80,26);
		SetTexture(imgEnemy);
		SetColor(255,255,255);
		SetAlpha(imgAlpha);
		SetRenderState(ALPHA);
		SetGraphicAngle(0,0,imgAngle);
		DrawGraphic(GetX(),GetY());
	}

        @Finalize
        {
		if(!BeVanished)
		{CreateItem(ITEM_SCORE,GetX,GetY);}
        }
}