task BossAnim(tobj, graphic, mod){
	
	let imgExRumia = graphic; //file path to enemy image

	ObjPrim_SetTexture(tobj, graphic); //Setting the above image file as a texture to the enemy object(objBoss)

	ObjSprite2D_SetSourceRect(tobj, mod*0, mod*0, mod*1, mod*1); //Setting the rectangle coordinates in the enemy image to use(Left, Top, Right, Bottom).

	ObjSprite2D_SetDestCenter(tobj);
	
	ObjRender_SetScaleXYZ(tobj, 1.1, 1.1, NULL);
	
	while(!Obj_IsDeleted(tobj)){
		
		if(ObjMove_GetSpeed(tobj)<=0){
			ObjSprite2D_SetSourceRect(tobj, mod*0, mod*0, mod*1, mod*1);
			}
			
		if(ObjMove_GetAngle(tobj)>=0){
			//ObjSprite2D_SetSourceRect(tobj, mod*2, mod*3, mod*3, mod*4);
			}
			
		if(ObjMove_GetAngle(tobj)<0){
			//ObjSprite2D_SetSourceRect(tobj, mod*2, mod*1, mod*3, mod*2);
			}
		
		yield;
		}
	}
	
task BossAura(tobj, graphic, mod, rate, yieldcount, RC, GC, BC){

	while(!Obj_IsDeleted(tobj)){
	let imgExRumia = graphic; //file path to enemy image
	
	let obj = ObjPrim_Create(OBJ_SPRITE_2D);
	ObjPrim_SetTexture(obj, graphic);
	Obj_SetRenderPriorityI(obj,22);
	ObjRender_SetBlendType(obj,BLEND_ADD_ARGB);
	ObjRender_SetAlpha(obj,170);

	ObjPrim_SetTexture(obj, graphic); //Setting the above image file as a texture to the enemy object(objBoss)

	ObjSprite2D_SetSourceRect(obj, mod*0, mod*0, mod*1, mod*1); //Setting the rectangle coordinates in the enemy image to use(Left, Top, Right, Bottom).
	ObjSprite2D_SetDestCenter(obj);
	ObjRender_SetScaleXYZ(obj, 1.8, 1.8, NULL);
	
	ObjRender_SetColor(obj, RC, GC, BC);
	
	ShrinkGraphic(obj, 1.8, rate);
	}
	
	task ShrinkGraphic(tobj, scale, rate){
		let decrease = 0;
		while(!Obj_IsDeleted(tobj)){
			ObjRender_SetScaleXYZ(tobj, scale-decrease, scale-decrease, NULL);
			ObjMove_SetPosition(tobj, ObjMove_GetX(tobj), ObjMove_GetY(tobj));
			
			decrease+=rate;
			
			if(decrease>=scale){
				Obj_Delete(tobj);
				}
			yield;
			}
		}
	
	}