script_enemy_main {

let acc1 = 0;
let acc2 = 0;
let frame1 = 0;
let frame2 = 0;

let BossImage = GetCurrentScriptDirectory~"familiar.png";

let ShotSE = GetCurrentScriptDirectory~"ShotSE3.wav";

@Initialize{
	LoadGraphic(BossImage);
	LoadSE(ShotSE);
	SetLife(10);
	SetMovePosition01(GetX, GetClipMaxY + 100, 3);
 }
@MainLoop{
    
	if (frame1 == 100)
        {
	loop(18){
        CreateShot02(GetX, GetY, 10, acc1, -0.7, 1, 77, 0);
	acc1 += 360/18;
	}
	frame1 = 0;
	PlaySE(ShotSE);
	}
	if (frame2 == 300)
        {
	SetLife(0);
	}
frame1++;
frame2++;
 }
@DrawLoop{
SetRenderState(ALPHA);
SetGraphicScale(1,1);
SetAlpha(255);
SetGraphicRect(0, 0, 66, 64);
SetTexture(BossImage);
SetGraphicAngle(0,0,acc2);
DrawGraphic(GetX, GetY);
acc2 += 10;
 }
@Finalize{
 }
}
