//Credits to Ultima and Miransu for the help!

let objScene = GetEnemyBossSceneObjectID;
let CSD = GetCurrentScriptDirectory;
let OnSpell = false;

@Initialize
{
	BGControl;
}

task BGControl
{
	DarkBG;
}

task DarkBG
{
	let obj = ObjPrim_Create(OBJ_SPRITE_2D);
	ObjRender_SetBlendType(obj, BLEND_ALPHA);
	Obj_SetRenderPriorityI(obj, 21);
	ObjPrim_SetTexture(obj, GetCurrentScriptDirectory~"./img/Spellbg THREE.png");
	ObjRender_SetScaleXYZ(obj, 2, 2, 2);
	ObjSprite2D_SetSourceRect(obj, 0, 0, 512, 512);
	ObjSprite2D_SetDestRect(obj, -512, -512, 512, 512);
	ObjRender_SetAlpha(obj, 255);
}