script_enemy_main
{
    let count=0;//‰…—ì
    let count2=0;
    let MT=0;
    let mm=0;
    let N15=0;
    let Level=0;

    @Initialize
{
    SetLife(1248);
    SetScore(15000);
    SetGraphicRect(256,0,320,64);
    Level+=GetPlayerLife();
}

@MainLoop
{
    if (GetArgument==0) {
        mm+=5+2*sin(count*2);
        if (count==0) {
            SetLife(750);
        }
        if (count>0&&count<=90) {
            SetSpeed(3.5-count*0.03);
            SetAngle(90);
        }
        if (count>90&&count<=1200) {
            SetSpeed(0);
        }
        if (count>1200) {
            SetAngle(-90);
            SetSpeed(2);
        }if (count>1400) {
            VanishEnemy;
        }
        if (count>100&&count<=1170) {
            if (count%2==0) {
                PlaySE(GetCurrentScriptDirectory~"\se\Shot00.wav");
                ascent( let t in 0..4 ) {
                    CreateShot02(GetX()-38*sin(mm+t*90),GetY()-5+38*cos(mm+t*90),0,mm+t*90,-0.02,-3,196,20);
                    CreateShot02(GetX()+66*sin(mm+t*90),GetY()-5-66*cos(mm+t*90),1,mm+t*90,-0.02,-3,196,20);
                }
            }
        }
        if (count>=18) {
            SetCollisionA(GetX(),GetY(),17);
            SetCollisionB(GetX(),GetY(),12);
        }if (count>=180) {
            SetDamageRate(100,25);
        }
    }

    if (GetArgument==13) {
        if (count==0) {
            SetScore(0);
            SetLife(3);
            SetSpeed(0);
        }if (count>10) {
            VanishEnemy;
        }
    }

    if (GetLife<5) {
        SetDamageRate(0,0);
        AddLife(300);
    }

    count++;
    count2++;

}

@Finalize
{
}

@DrawLoop
{

}
}
