task CreateStageEnemy1(x, y, speedE, angleE) {
    let count = 0; //Counter
    let Xmin = -32;
    let Xmax = GetStgFrameWidth + 32;
    let Ymin = -32; 
    let Ymax = GetStgFrameHeight + 32;
	let imgenemy = GetCurrentScriptDirectory ~ "familiar.png"
    let objEnemy;
    TInitialize;
    task TInitialize {
        objEnemy = ObjEnemy_Create(OBJ_ENEMY);
        ObjEnemy_Regist(objEnemy);
        ObjEnemy_SetLife(objEnemy, 48);
		ObjPrim_SetTexture(objEnemy,imgenemy);
        SetDamageRateAtFrameEnm(objEnemy, 80, 50, 30);
        ObjMove_SetPosition(objEnemy, x, y);
        ObjMove_SetAngle(objEnemy, angleE);
        ObjMove_SetSpeed(objEnemy, speedE);
        TDrawLoop(objEnemy);
        TMainLoop;
        TFinalize;
    }
    task TMainLoop {
        while(ObjEnemy_GetInfo(objEnemy, INFO_LIFE) > 0) {
            ObjEnemy_SetIntersectionCircleToShot(objEnemy, ObjMove_GetX(objEnemy), ObjMove_GetY(objEnemy), 32); 
            ObjEnemy_SetIntersectionCircleToPlayer(objEnemy, ObjMove_GetX(objEnemy), ObjMove_GetY(objEnemy), 8);
            if (count == 30) {bulletA;}
            if (GetEnemyX(objEnemy) < Xmin || GetEnemyX(objEnemy) > Xmax || GetEnemyY(objEnemy) < Ymin || GetEnemyY(objEnemy) > Ymax) {
                ObjEnemy_SetLife(objEnemy, -1000);
            }
            count++;
            yield;
        }
    }
    task bulletA{
        while(ObjEnemy_GetInfo(objEnemy, INFO_LIFE) > 0) {
            //Do stuff
            yield;
        }
    }
    task TFinalize {
        while(ObjEnemy_GetInfo(objEnemy, INFO_LIFE) > 0) {yield;}
        Obj_Delete(objEnemy);
    }
}