

script_enemy_main
{
    let cx = GetCenterX();
    let cy = GetCenterY();
    let count = 0;
    let count2 = 0;




    @Initialize()
    {
        SetLife(1);
        ForbidShot(true);
        ForbidBomb(true);
    }

    @MainLoop()
    {
        count2++;
        SetNormPoint(-1);
        if (OnEvent()==true) {
            break;
        }
        if (GetSpeed!=0) {
            break;
        }
        if (count == 2)
        {
            SetMovePosition02(cx+1,145,80);
            CreateEventFromScript("B");
        }
        if (count == 3)
        {
            VanishEnemy;
        }
        count++;
    }

    @DrawLoop
    {
    }

    @Finalize() {}
}

script_event B
{
    function IntToString(num) {
        let retStr = "";//߂l
        let numStr = ToString(num);

        let i = 0;
        while (i < length(numStr)) {
            let tmp = numStr[i];
            if (tmp == '.') {	//_ŏI
                break;
            }
            retStr = retStr ~ [tmp];
            i++;
        }
        return retStr;
    }

    let count = 0;
    @Initialize
    {
    }

    @MainLoop
    {count++;

     TextOut("\c[RED]̃XRA@@@@F"~IntToString(GetCommonDataDefaultEx("Spell","HighScore",0))~"_ \nO܂ł̃nCXRAF"~IntToString(GetCommonDataDefaultEx("Spell","HighScore_before",0))~"_");
    if (GetCommonDataDefaultEx("Spell","HighScore",0)>GetCommonDataDefaultEx("Spell","HighScore_before",0)) {
    TextOut("\c[RED]nCXRAXVI F"~IntToString(GetCommonDataDefaultEx("Spell","HighScore",0))~"_\n                {"~IntToString(GetScore()-GetCommonDataDefaultEx("Spell","HighScore_before",0))~"XV");
    }
    End();
    }

    @Finalize
    {

    }
}

