script_enemy_main
{//Enemy22
        let count=0;
        let csd     = GetCurrentScriptDirectory;
	let imgEnemy=csd~"img\dot_kedama.png";
	let imgAngle=0;
	let shotse=csd~"se\ShotSE02.wav";

    @Initialize {
        SetLife(5);
        SetScore(5);
	SetX(GetX);
	SetY(GetY);
        SetDamageRate(100,100);
	LoadGraphic(imgEnemy);
	SetMovePosition03(GetArgument,GetY,15,4);
	LoadUserShotData(csd~"img\PLUS_shot.txt");
	}

    @MainLoop {
		imgAngle+=4;
		if(imgAngle>360){imgAngle=0;}
	if(count%20==0){
		PlaySE(shotse);
        	SetShotDirectionType(ABSOLUTE);
        		let i = 0;
        		while(i<8)
        		{
        		let shot01 = 1;
        		CreateShotA(shot01,GetX(),GetY(),10);
        		SetShotDataA(shot01,0,4,i*45,0,-0.01,3,134);
        		FireShot(shot01);
        		i++;
        		}
		}
	if(count==120){
		SetMovePosition03(GetArgument,500,10,4);
		}
        	if(GetY>499)
        	{
        		VanishEnemy();
        	}
        SetCollisionA(GetX(),GetY(),10);
        SetCollisionB(GetX(),GetY(),10);
        count++;
    }

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

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