//let GCSD = GetCurrentScriptDirectory;
task magiccircle(boss,size,type){
	let objScene=GetEnemyBossSceneObjectID();
	let obj=ObjPrim_Create(OBJ_SPRITE_2D);
	let img=GCSD~"./../img/MG.png";
	let spin = 0;
	let s = 0;
	LoadTexture(img);
	ObjPrim_SetTexture(obj,img);
	ObjSprite2D_SetSourceRect(obj,0,0,256,256);
	ObjSprite2D_SetDestCenter(obj);
	ObjRender_SetScaleXYZ(obj,size,size,size);
	ObjRender_SetAlpha(obj,192);
	ObjRender_SetBlendType(obj,BLEND_ADD_RGB);
	while(!Obj_IsDeleted(objBoss)){
	spin += 1;
	let timer = ObjEnemyBossScene_GetInfo(objScene, INFO_TIMERF);
	ObjRender_SetAngleXYZ(obj,0,0,spin*2);
	ObjRender_SetPosition(obj,ObjMove_GetX(objBoss),ObjMove_GetY(objBoss),0);
	ObjRender_SetColor(obj,192+32*sin(spin),192+32*sin(spin+180),0);
	if(type==true){
	ObjRender_SetScaleXYZ(obj,size*1.1+0.1*sin(spin),size*1.1+0.1*sin(spin),0);
	}
	}
	Obj_Delete(obj);
	}
	
task DrawName(name, color, size){
	let objText = ObjText_Create();
	ObjText_SetText(objText, name);
	ObjText_SetFontSize(objText, size);
	ObjText_SetFontColorTop(objText, 255, 255, 255);
	ObjText_SetFontColorBottom(objText, color[0], color[1], color[2]);
	ObjText_SetFontBorderType(objText, BORDER_SHADOW);
	ObjText_SetFontBorderColor(objText,0, 0, 0);
	ObjText_SetFontBorderWidth(objText, 2);
	ObjRender_SetPosition(objText,0,1,0);
	}
	