#e
#Title[ɍʁuFto[v]
#Text[ŏI`]
#PlayLevel[Extra]
#BGM[.\BGM\th06_14.wav]
#Image[script\img\WbNiCt.png]
#ScriptVersion[2]

script_enemy_main {
    let imgSBoss   =GetCurrentScriptDirectory~".\img\China.png";
    let frame     =  0;
    let frame2 = 0;
    let frame3 = 0;
    let shootSE = GetCurrentScriptDirectory~".\SE\shoot13.wav";
    let Scutin = GetCurrentScriptDirectory~".\img\cutChina.png";
   
    @Initialize {
         SetLife(3000);
         SetScore(1500000);//XyJ[h{[iX30000ɐݒ
         SetTimer(60);//Ԑ60bɐݒ
         LoadGraphic(imgSBoss);
         SetTexture(imgSBoss);
         SetGraphicRect(0, 0, 44, 86);
	 SetMovePosition02(224,90,60);
	SetInvincibility(30);//G30t[Gɂ
         CutIn(KOUMA,"ɍʁuFto[v",Scutin,0,0,256,256);//XyJ[h\
    }

    @MainLoop {
frame++;
frame2++;
frame3++;
        SetCollisionA(GetX, GetY, 24);
        SetCollisionB(GetX, GetY, 24);
 if (frame==20){  
PlaySE(shootSE);
let angle = rand(-3,3);
loop(40){
SetShotDirectionType(PLAYER);
CreateShot01(GetX(),GetY(),2,angle,RED01,0);
angle += 9;}
}else if(frame==40){  
PlaySE(shootSE);
let angle = rand(-3,3);
loop(40){
SetShotDirectionType(PLAYER);
CreateShot01(GetX(),GetY(),2,angle,BLUE01,0);
angle += 9;}
}else if(frame==60){  
PlaySE(shootSE);
let angle = rand(-3,3);
loop(40){
SetShotDirectionType(PLAYER);
CreateShot01(GetX(),GetY(),2,angle,YELLOW01,0);
angle += 9;}
}else if(frame==80){  
PlaySE(shootSE);
let angle = rand(-3,3);
loop(40){
SetShotDirectionType(PLAYER);
CreateShot01(GetX(),GetY(),2,angle,AQUA01,0);
angle += 9;}
}else if(frame==100){  
PlaySE(shootSE);
let angle = rand(-3,3);
loop(40){
SetShotDirectionType(PLAYER);
CreateShot01(GetX(),GetY(),2,angle,WHITE01,0);
angle += 9;}
}else if(frame==120){  
PlaySE(shootSE);
let angle = rand(-3,3);
loop(40){
SetShotDirectionType(PLAYER);
CreateShot01(GetX(),GetY(),2,angle,ORANGE01,0);
angle += 9;}
frame = 0;
}
}

    @DrawLoop {
        DrawGraphic(GetX, GetY);
    }

    @Finalize {
        DeleteGraphic(imgSBoss);
	DeleteSE(shootSE);
	loop(24){CreateItem(ITEM_SCORE,GetX()+rand(-70,70),GetY()+rand(-70,70));}
	CreateItem(ITEM_1UP,GetX(),GetY());
    }
}
