

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


    function IntToString(num) {
        let retStr = "";//戻り値
        let numStr = ToString(num);

        let i = 0;
        while (i < length(numStr)) {
            let tmp = numStr[i];
            if (tmp == '.') {	//小数点で終了
                break;
            }
            retStr = retStr ~ [tmp];
            i++;
        }
        return retStr;
    }



    @Initialize()
    {
        SetLife(1);
        PlaySE(GetCurrentScriptDirectory~"\se\power34.wav");
    }

    @MainLoop()
    {
        if (count == 90)
        {
            VanishEnemy;
        }
        count++;
    }

    @DrawLoop
    {

        if (GetPlayerType()==REIMU_A || GetPlayerType()==REIMU_B) {
            if (count<=100&&count%5<4) {
                SetFontColor(255,196,196,255,0,0);
                DrawText("NoMissBonus",GetCenterX()-50,170,20,235);
            }
            SetFontColor(255,196,196,255,0,0);
            DrawText("+50000000",GetCenterX()-50,195,20,235);
        }

        else if (GetPlayerType()==MARISA_A || GetPlayerType()==MARISA_B) {
            if (count<=100&&count%5<4) {
                SetFontColor(255,196,196,255,0,0);
                DrawText("NoMissBonus",GetCenterX()-50,186,20,235);
            }
            SetFontColor(255,196,196,255,0,0);
            DrawText("+50000000",GetCenterX()-50,211,20,235);
        }

        else {
            if (count<=100&&count%5<4) {
                SetFontColor(255,196,196,255,0,0);
                DrawText("NoMissBonus",GetCenterX()-50,174,20,235);
            }
            SetFontColor(255,196,196,255,0,0);
            DrawText("+50000000",GetCenterX()-50,199,20,235);
        }
    }

    @Finalize() {}
}

