//効果音------------------------------------------------------------
let arrow01     =GetCurrentScriptDirectory~"SE\arrow01.wav";
let bell03      =GetCurrentScriptDirectory~"SE\bell03.wav";
let shoot13     =GetCurrentScriptDirectory~"SE\shoot13.wav";
let Hit		=GetCurrentScriptDirectory~"SE\clap00.wav";
let count_a	=GetCurrentScriptDirectory~"SE\cursor15_a.wav";
let count_b	=GetCurrentScriptDirectory~"SE\cursor15_b.wav";
let Lazer1	=GetCurrentScriptDirectory~"SE\byoro07.wav";
let Lazer2	=GetCurrentScriptDirectory~"SE\tm2_gun000.wav";
let Lazer3	=GetCurrentScriptDirectory~"SE\gun10.wav";
let warp02	=GetCurrentScriptDirectory~"SE\warp02.wav";
let Hitframe=0;
//画像--------------------------------------------------------------
InitializeAction();
let Item  	=GetCurrentScriptDirectory~"\img\effect_tiny.png";
let imgScore	=GetCurrentScriptDirectory~"\img\imgScore.png";//スコアなど
let imgSpellBouns=GetCurrentScriptDirectory~"\img\imgSpellBouns.png";//スコアなど
//難易度-----------------------------------------------------------
let Level = GetCommonData("AnotherMode");
//規定値--------------------------------------------------------------
//DeleteEnemyShot(ALL);
let cx=GetCenterX;
let cy=GetCenterY;
let cmx=GetClipMinX;//画面X最小
let cmX=GetClipMaxX;//画面X最大
let cmy=GetClipMinY;//画面Y最小
let cmY=GetClipMaxY;//画面Y最大

//エネミーマーカー
#include_function ".\lib\lib_EnemyMarker.txt"
EnemyMarker;

task SetCountDown{
	loop{

		if(GetTimer<10){
			PlaySE(count_a);
			if(GetTimer<5){
				PlaySE(count_b);
			}
			loop(59){yield;}
		}
		yield;
	}
}

task SpellCutName(UV_X,UV_Y,DefScore){//スペル宣言
	SetCommonData("SpellCade",true);				//スペル中
	PlaySE("seUseSpellCard.wav");					//効果音
	let imgSpell = GetCurrentScriptDirectory~"\img\Spell.png";	//スペル
	MagicCircle(false);						//魔方陣は無し
	let Sca=1.0;
	let Y=76;
	let A=128;
    	let obj=Obj_Create(OBJ_EFFECT);
	Obj_SetAutoDelete(obj,false);
	ObjEffect_SetTexture(obj,imgSpell);
	ObjEffect_SetPrimitiveType(obj,PRIMITIVE_TRIANGLESTRIP);
	ObjEffect_CreateVertex(obj,4);
	ObjEffect_SetLayer(obj,5);
	ObjEffect_SetVertexXY(obj,0,-256,-16);
	ObjEffect_SetVertexXY(obj,1,   0,-16);
	ObjEffect_SetVertexXY(obj,2,-256, 16);
	ObjEffect_SetVertexXY(obj,3,   0, 16);
	ObjEffect_SetVertexUV(obj,0,UV_X    ,UV_Y);
	ObjEffect_SetVertexUV(obj,1,UV_X+256,UV_Y);
	ObjEffect_SetVertexUV(obj,2,UV_X    ,UV_Y+32);
	ObjEffect_SetVertexUV(obj,3,UV_X+256,UV_Y+32);
	loop(30){yield;}
	loop(20){
		A+=127/20;
		Sca-=0.2/20;
		ObjEffect_SetVertexColor(obj,0,A,255,255,255);
		ObjEffect_SetVertexColor(obj,1,A,255,223,223);
		ObjEffect_SetVertexColor(obj,2,A,255,96,96);
		ObjEffect_SetVertexColor(obj,3,A,255,64,96);
		ObjEffect_SetScale(obj,Sca,Sca);
		Obj_SetPosition(obj,GetCenterX+185,GetCenterY+Y);
		yield;
	}
	loop(30){yield;}
	loop(35){
		Obj_SetPosition(obj,GetCenterX+185,GetCenterY+Y);
		Y-=7.9;
		yield;
	}
	SetScoreSpell(DefScore);
}