task Cdraw//自機中心の陣のタスク
{
let angle=0;
let Malpha=0;
loop
{
  		let obj = Obj_Create(OBJ_EFFECT);
		Obj_SetPosition(obj,GetPlayerX,GetPlayerY);
		ObjEffect_SetTexture(obj, imgBorder);
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
		//ObjEffect_SetRenderState(obj, ADD);
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, -32, -32);
		ObjEffect_SetVertexXY(obj, 1,  32, -32);
		ObjEffect_SetVertexXY(obj, 2,  32,  32);
		ObjEffect_SetVertexXY(obj, 3, -32,  32);
		
		ObjEffect_SetVertexUV(obj, 0,  64,  0);
		ObjEffect_SetVertexUV(obj, 1,  128, 0);
		ObjEffect_SetVertexUV(obj, 2, 128, 64);
		ObjEffect_SetVertexUV(obj, 3, 64, 64);

		ObjEffect_SetVertexColor(obj,0,Malpha,255,255,255);
		ObjEffect_SetVertexColor(obj,1,Malpha,255,255,255);
		ObjEffect_SetVertexColor(obj,2,Malpha,255,255,255);
		ObjEffect_SetVertexColor(obj,3,Malpha,255,255,255);

		ObjEffect_SetLayer(obj, 2);
		ObjEffect_SetAngle(obj, 0,0,angle);
		angle+=1.5;
		if(GetKeyState(VK_SLOWMOVE)==KEY_PUSH || GetKeyState(VK_SLOWMOVE)==KEY_HOLD)
		{
			if(Malpha<150)
			{
				Malpha+=10;
			}
		}
		else
		{
			if(Malpha>0)
			{
				Malpha-=10;
			}
		}
		yield;
		Obj_Delete(obj);
}
}


task atari//当り判定の描画
{
  		let obj = Obj_Create(OBJ_EFFECT);
		Obj_SetPosition(obj,GetPlayerX,GetPlayerY);
		ObjEffect_SetTexture(obj, imgBorder);
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
		//ObjEffect_SetRenderState(obj, ADD);
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, -5, -5);
		ObjEffect_SetVertexXY(obj, 1,  5, -5);
		ObjEffect_SetVertexXY(obj, 2,  5,  5);
		ObjEffect_SetVertexXY(obj, 3, -5,  5);
		
		ObjEffect_SetVertexUV(obj, 0,  27,  27);
		ObjEffect_SetVertexUV(obj, 1,  37, 27);
		ObjEffect_SetVertexUV(obj, 2, 37,  37);
		ObjEffect_SetVertexUV(obj, 3, 27, 37);
		if(GetKeyState(VK_SLOWMOVE)==KEY_PUSH || GetKeyState(VK_SLOWMOVE)==KEY_HOLD)
		{
		ObjEffect_SetVertexColor(obj,0,250,255,255,255);
		ObjEffect_SetVertexColor(obj,1,250,255,255,255);
		ObjEffect_SetVertexColor(obj,2,250,255,255,255);
		ObjEffect_SetVertexColor(obj,3,250,255,255,255);
		}
		else
		{
		ObjEffect_SetVertexColor(obj,0,0,255,255,255);
		ObjEffect_SetVertexColor(obj,1,0,255,255,255);
		ObjEffect_SetVertexColor(obj,2,0,255,255,255);
		ObjEffect_SetVertexColor(obj,3,0,255,255,255);
		}
		
		ObjEffect_SetLayer(obj, 3);
		yield;
		Obj_Delete(obj);
}

task FinderCircle(Cobj)//カメラの中心をくるくる回ってるやつ
{
		let angle=0;
		let R=15;
		let r=10;
  		let obj = Obj_Create(OBJ_EFFECT);
		Obj_SetPosition(obj,GetPlayerX,GetPlayerY);
		ObjEffect_SetTexture(obj, imgCircle);
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
		//ObjEffect_SetRenderState(obj, ADD);
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, -5, -5);
		ObjEffect_SetVertexXY(obj, 1,  5, -5);
		ObjEffect_SetVertexXY(obj, 2,  5,  5);
		ObjEffect_SetVertexXY(obj, 3, -5,  5);
		
		ObjEffect_SetVertexUV(obj, 0,  0,  0);
		ObjEffect_SetVertexUV(obj, 1,  27, 0);
		ObjEffect_SetVertexUV(obj, 2, 27,  27);
		ObjEffect_SetVertexUV(obj, 3,0, 27);
		ObjEffect_SetLayer(obj, 3);
//////////////////////////////////////////////////////////////////
  		let obj2 = Obj_Create(OBJ_EFFECT);
		Obj_SetPosition(obj2,GetPlayerX,GetPlayerY);
		ObjEffect_SetTexture(obj2, imgCircle);
		ObjEffect_SetPrimitiveType(obj2, PRIMITIVE_TRIANGLEFAN);
		//ObjEffect_SetRenderState(obj2, ADD);
		ObjEffect_CreateVertex(obj2, 4);
		ObjEffect_SetVertexXY(obj2, 0, -5, -5);
		ObjEffect_SetVertexXY(obj2, 1,  5, -5);
		ObjEffect_SetVertexXY(obj2, 2,  5,  5);
		ObjEffect_SetVertexXY(obj2, 3, -5,  5);
		
		ObjEffect_SetVertexUV(obj2, 0,  0,  0);
		ObjEffect_SetVertexUV(obj2, 1,  27, 0);
		ObjEffect_SetVertexUV(obj2, 2, 27,  27);
		ObjEffect_SetVertexUV(obj2, 3,0, 27);
		ObjEffect_SetLayer(obj2, 3);
/////////////////////////////////////////////////////////////////////////////
  		let obj3 = Obj_Create(OBJ_EFFECT);
		Obj_SetPosition(obj3,GetPlayerX,GetPlayerY);
		ObjEffect_SetTexture(obj3, imgCircle);
		ObjEffect_SetPrimitiveType(obj3, PRIMITIVE_TRIANGLEFAN);
		//ObjEffect_SetRenderState(obj3, ADD);
		ObjEffect_CreateVertex(obj3, 4);
		ObjEffect_SetVertexXY(obj3, 0, -5, -5);
		ObjEffect_SetVertexXY(obj3, 1,  5, -5);
		ObjEffect_SetVertexXY(obj3, 2,  5,  5);
		ObjEffect_SetVertexXY(obj3, 3, -5,  5);
		
		ObjEffect_SetVertexUV(obj3, 0,  0,  0);
		ObjEffect_SetVertexUV(obj3, 1,  27, 0);
		ObjEffect_SetVertexUV(obj3, 2, 27,  27);
		ObjEffect_SetVertexUV(obj3, 3,0, 27);
		ObjEffect_SetLayer(obj3, 3);
////////////////////////////////////////////////////////////////////////////////////
  		let obj4 = Obj_Create(OBJ_EFFECT);
		Obj_SetPosition(obj2,GetPlayerX,GetPlayerY);
		ObjEffect_SetTexture(obj4, imgCircle);
		ObjEffect_SetPrimitiveType(obj4, PRIMITIVE_TRIANGLEFAN);
		//ObjEffect_SetRenderState(obj4, ADD);
		ObjEffect_CreateVertex(obj4, 4);
		ObjEffect_SetVertexXY(obj4, 0, -5, -5);
		ObjEffect_SetVertexXY(obj4, 1,  5, -5);
		ObjEffect_SetVertexXY(obj4, 2,  5,  5);
		ObjEffect_SetVertexXY(obj4, 3, -5,  5);
		
		ObjEffect_SetVertexUV(obj4, 0,  0,  0);
		ObjEffect_SetVertexUV(obj4, 1,  27, 0);
		ObjEffect_SetVertexUV(obj4, 2, 27,  27);
		ObjEffect_SetVertexUV(obj4, 3,0, 27);
		ObjEffect_SetLayer(obj4, 3);
//////////////////////////////////////////////////////////////////////////
  		let obj5 = Obj_Create(OBJ_EFFECT);
		Obj_SetPosition(obj5,GetPlayerX,GetPlayerY);
		ObjEffect_SetTexture(obj5, imgCircle);
		ObjEffect_SetPrimitiveType(obj5, PRIMITIVE_TRIANGLEFAN);
		//ObjEffect_SetRenderState(obj5, ADD);
		ObjEffect_CreateVertex(obj5, 4);
		ObjEffect_SetVertexXY(obj5, 0, -5, -5);
		ObjEffect_SetVertexXY(obj5, 1,  5, -5);
		ObjEffect_SetVertexXY(obj5, 2,  5,  5);
		ObjEffect_SetVertexXY(obj5, 3, -5,  5);
		
		ObjEffect_SetVertexUV(obj5, 0,  0,  0);
		ObjEffect_SetVertexUV(obj5, 1,  27, 0);
		ObjEffect_SetVertexUV(obj5, 2, 27,  27);
		ObjEffect_SetVertexUV(obj5, 3,0, 27);
		ObjEffect_SetLayer(obj5, 3);
////////////////////////////////////////////////////////////////////////////////////
  		let obj6 = Obj_Create(OBJ_EFFECT);
		Obj_SetPosition(obj6,GetPlayerX,GetPlayerY);
		ObjEffect_SetTexture(obj6, imgCircle);
		ObjEffect_SetPrimitiveType(obj6, PRIMITIVE_TRIANGLEFAN);
		//ObjEffect_SetRenderState(obj6, ADD);
		ObjEffect_CreateVertex(obj6, 4);
		ObjEffect_SetVertexXY(obj6, 0, -5, -5);
		ObjEffect_SetVertexXY(obj6, 1,  5, -5);
		ObjEffect_SetVertexXY(obj6, 2,  5,  5);
		ObjEffect_SetVertexXY(obj6, 3, -5,  5);
		
		ObjEffect_SetVertexUV(obj6, 0,  0,  0);
		ObjEffect_SetVertexUV(obj6, 1,  27, 0);
		ObjEffect_SetVertexUV(obj6, 2, 27,  27);
		ObjEffect_SetVertexUV(obj6, 3,0, 27);
		ObjEffect_SetLayer(obj6, 3);
//////////////////////////////////////////////////////////////////////////
  		let obj7 = Obj_Create(OBJ_EFFECT);
		Obj_SetPosition(obj7,GetPlayerX,GetPlayerY);
		ObjEffect_SetTexture(obj7, imgCircle);
		ObjEffect_SetPrimitiveType(obj7, PRIMITIVE_TRIANGLEFAN);
		//ObjEffect_SetRenderState(obj7, ADD);
		ObjEffect_CreateVertex(obj7, 4);
		ObjEffect_SetVertexXY(obj7, 0, -5, -5);
		ObjEffect_SetVertexXY(obj7, 1,  5, -5);
		ObjEffect_SetVertexXY(obj7, 2,  5,  5);
		ObjEffect_SetVertexXY(obj7, 3, -5,  5);
		
		ObjEffect_SetVertexUV(obj7, 0,  0,  0);
		ObjEffect_SetVertexUV(obj7, 1,  27, 0);
		ObjEffect_SetVertexUV(obj7, 2, 27,  27);
		ObjEffect_SetVertexUV(obj7, 3,0, 27);
		ObjEffect_SetLayer(obj7, 3);
////////////////////////////////////////////////////////////////////////////////////
  		let obj8 = Obj_Create(OBJ_EFFECT);
		Obj_SetPosition(obj8,GetPlayerX,GetPlayerY);
		ObjEffect_SetTexture(obj8, imgCircle);
		ObjEffect_SetPrimitiveType(obj8, PRIMITIVE_TRIANGLEFAN);
		//ObjEffect_SetRenderState(obj8, ADD);
		ObjEffect_CreateVertex(obj8, 4);
		ObjEffect_SetVertexXY(obj8, 0, -5, -5);
		ObjEffect_SetVertexXY(obj8, 1,  5, -5);
		ObjEffect_SetVertexXY(obj8, 2,  5,  5);
		ObjEffect_SetVertexXY(obj8, 3, -5,  5);
		
		ObjEffect_SetVertexUV(obj8, 0,  0,  0);
		ObjEffect_SetVertexUV(obj8, 1,  27, 0);
		ObjEffect_SetVertexUV(obj8, 2, 27,  27);
		ObjEffect_SetVertexUV(obj8, 3,0, 27);
		ObjEffect_SetLayer(obj8, 3);
//////////////////////////////////////////////////////////////////////////
		loop
		{
		yield;
		if(Charge==100)
		{
			Obj_SetPosition(obj,Obj_GetX(Cobj)+R*cos(angle),Obj_GetY(Cobj)+R*sin(angle));
			Obj_SetPosition(obj2,Obj_GetX(Cobj)+R*cos(angle-180),Obj_GetY(Cobj)+R*sin(angle-180));
			Obj_SetPosition(obj3,Obj_GetX(Cobj)+R*cos(angle-30),Obj_GetY(Cobj)+R*sin(angle-30));
			Obj_SetPosition(obj4,Obj_GetX(Cobj)+R*cos(angle-210),Obj_GetY(Cobj)+R*sin(angle-210));
			Obj_SetPosition(obj5,Obj_GetX(Cobj)+R*cos(angle-60),Obj_GetY(Cobj)+R*sin(angle-60));
			Obj_SetPosition(obj6,Obj_GetX(Cobj)+R*cos(angle-240),Obj_GetY(Cobj)+R*sin(angle-240));
			Obj_SetPosition(obj7,Obj_GetX(Cobj)+R*cos(angle-90),Obj_GetY(Cobj)+R*sin(angle-90));
			Obj_SetPosition(obj8,Obj_GetX(Cobj)+R*cos(angle-270),Obj_GetY(Cobj)+R*sin(angle-270));
		}
		else
		{
			Obj_SetPosition(obj,Obj_GetX(Cobj)+r*cos(angle),Obj_GetY(Cobj)+r*sin(angle));
			Obj_SetPosition(obj2,Obj_GetX(Cobj)+r*cos(angle-180),Obj_GetY(Cobj)+r*sin(angle-180));
			Obj_SetPosition(obj3,Obj_GetX(Cobj)+r*cos(angle-30),Obj_GetY(Cobj)+r*sin(angle-30));
			Obj_SetPosition(obj4,Obj_GetX(Cobj)+r*cos(angle-210),Obj_GetY(Cobj)+r*sin(angle-210));
			Obj_SetPosition(obj5,Obj_GetX(Cobj)+r*cos(angle-60),Obj_GetY(Cobj)+r*sin(angle-60));
			Obj_SetPosition(obj6,Obj_GetX(Cobj)+r*cos(angle-240),Obj_GetY(Cobj)+r*sin(angle-240));
			Obj_SetPosition(obj7,Obj_GetX(Cobj)+r*cos(angle-90),Obj_GetY(Cobj)+r*sin(angle-90));
			Obj_SetPosition(obj8,Obj_GetX(Cobj)+r*cos(angle-270),Obj_GetY(Cobj)+r*sin(angle-270));
		}
		if(Charge==100)
		{
			ascent(let i in 0..4)
			{
				if(FinderMode==false)
				{
					ObjEffect_SetVertexColor(obj,i,200,255,150,150);
					ObjEffect_SetVertexColor(obj2,i,200,255,150,150);
					ObjEffect_SetVertexColor(obj3,i,200,255,150,150);
					ObjEffect_SetVertexColor(obj4,i,200,255,150,150);
					ObjEffect_SetVertexColor(obj5,i,200,255,150,150);
					ObjEffect_SetVertexColor(obj6,i,200,255,150,150);
					ObjEffect_SetVertexColor(obj7,i,200,255,150,150);
					ObjEffect_SetVertexColor(obj8,i,200,255,150,150);
				}
				else
				{
					ObjEffect_SetVertexColor(obj,i,0,255,150,150);
					ObjEffect_SetVertexColor(obj2,i,0,255,150,150);
					ObjEffect_SetVertexColor(obj3,i,0,255,150,150);
					ObjEffect_SetVertexColor(obj4,i,0,255,150,150);
					ObjEffect_SetVertexColor(obj5,i,0,255,150,150);
					ObjEffect_SetVertexColor(obj6,i,0,255,150,150);
					ObjEffect_SetVertexColor(obj7,i,0,255,150,150);
					ObjEffect_SetVertexColor(obj8,i,0,255,150,150);
				}
			}
			ObjEffect_SetScale(obj, 1,1);
			ObjEffect_SetScale(obj2, 1,1);
			ObjEffect_SetScale(obj3, 0.75,0.75);
			ObjEffect_SetScale(obj4, 0.75,0.75);
			ObjEffect_SetScale(obj5, 0.5,0.5);
			ObjEffect_SetScale(obj6, 0.5,0.5);
			ObjEffect_SetScale(obj7, 0.25,0.25);
			ObjEffect_SetScale(obj8, 0.25,0.25);
		}
		else
		{
			ascent(let i in 0..4)
			{
				if(FinderMode==false)
				{
					ObjEffect_SetVertexColor(obj,i,150,255,255,255);
					ObjEffect_SetVertexColor(obj2,i,150,255,255,255);
					ObjEffect_SetVertexColor(obj3,i,150,255,255,255);
					ObjEffect_SetVertexColor(obj4,i,150,255,255,255);
					ObjEffect_SetVertexColor(obj5,i,150,255,255,255);
					ObjEffect_SetVertexColor(obj6,i,150,255,255,255);
					ObjEffect_SetVertexColor(obj7,i,150,255,255,255);
					ObjEffect_SetVertexColor(obj8,i,150,255,255,255);
				}
				else
				{
					ObjEffect_SetVertexColor(obj,i,0,255,255,255);
					ObjEffect_SetVertexColor(obj2,i,0,255,255,255);
					ObjEffect_SetVertexColor(obj3,i,0,255,255,255);
					ObjEffect_SetVertexColor(obj4,i,0,255,255,255);
					ObjEffect_SetVertexColor(obj5,i,0,255,255,255);
					ObjEffect_SetVertexColor(obj6,i,0,255,255,255);
					ObjEffect_SetVertexColor(obj7,i,0,255,255,255);
					ObjEffect_SetVertexColor(obj8,i,0,255,255,255);
				}
			}
			ObjEffect_SetScale(obj, 0.5,0.5);
			ObjEffect_SetScale(obj2, 0.5,0.5);
			ObjEffect_SetScale(obj3, 0.375,0.375);
			ObjEffect_SetScale(obj4, 0.375,0.375);
			ObjEffect_SetScale(obj5, 0.25,0.25);
			ObjEffect_SetScale(obj6, 0.25,0.25);
			ObjEffect_SetScale(obj7, 0.125,0.125);
			ObjEffect_SetScale(obj8, 0.125,0.125);
		}
		angle+=6;
		if(Charge==100)
		{	
			angle+=6;
		}
		}
}

task Successed//Success!!と表示
{
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, imgBorder);
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);

		ObjEffect_SetVertexXY(obj, 0, -40, -8);
		ObjEffect_SetVertexXY(obj, 1, 40,  -8);
		ObjEffect_SetVertexXY(obj, 2, 40, 8);
		ObjEffect_SetVertexXY(obj, 3,  -40,  8);
		
		ObjEffect_SetVertexUV(obj, 0,  0,  166);
		ObjEffect_SetVertexUV(obj, 1,  81, 166);
		ObjEffect_SetVertexUV(obj, 2, 81,  182);
		ObjEffect_SetVertexUV(obj, 3, 0, 182);
	
		Obj_SetPosition(obj,GetPlayerX+43,GetPlayerY-30);
		ObjEffect_SetLayer(obj,3);
		ObjEffect_SetScale(obj, 0.6,0.5);
		loop(120)
		{
			ascent(let i in 0..4)
			{
				ObjEffect_SetVertexColor(obj,i,150+55*cos(EnableAngle),200,200,255);
			}
		yield;
		}
		Obj_Delete(obj);
}

task Failed//Failedと表示
{
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, imgBorder);
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);

		ObjEffect_SetVertexXY(obj, 0, -27, -8);
		ObjEffect_SetVertexXY(obj, 1, 27,  -8);
		ObjEffect_SetVertexXY(obj, 2, 27, 8);
		ObjEffect_SetVertexXY(obj, 3,  -27, 8);
		
		ObjEffect_SetVertexUV(obj, 0,  90,  166);
		ObjEffect_SetVertexUV(obj, 1,  145, 166);
		ObjEffect_SetVertexUV(obj, 2, 145,  182);
		ObjEffect_SetVertexUV(obj, 3, 90, 182);
		
		Obj_SetPosition(obj,GetPlayerX+25,GetPlayerY-30);
		ObjEffect_SetLayer(obj,3);
		ObjEffect_SetScale(obj, 0.6,0.5);
		loop(120)
		{
			ascent(let i in 0..4)
			{
				ObjEffect_SetVertexColor(obj,i,150+55*cos(EnableAngle),200,200,255);
			}
		yield;
		}
		Obj_Delete(obj);
}

task ChargeEffecttask
{
loop
{

yield;
}
}

task ChargeEffect//高速巻き時に呼ばれるエフェクトタスク
{
		let R=rand(40,80);
		let BaseR=R;
		let scx=0.5;
		let scy=0.5;
		let angle=rand(0,360);
  		let obj = Obj_Create(OBJ_EFFECT);
		Obj_SetPosition(obj,GetPlayerX+R*cos(angle),GetPlayerY+R*sin(angle));
		ObjEffect_SetTexture(obj, imgCircle);
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
		//ObjEffect_SetRenderState(obj, ADD);
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, -5, -5);
		ObjEffect_SetVertexXY(obj, 1,  5, -5);
		ObjEffect_SetVertexXY(obj, 2,  5,  5);
		ObjEffect_SetVertexXY(obj, 3, -5,  5);
		
		ObjEffect_SetVertexUV(obj, 0,  0,  0);
		ObjEffect_SetVertexUV(obj, 1,  27, 0);
		ObjEffect_SetVertexUV(obj, 2, 27,  27);
		ObjEffect_SetVertexUV(obj, 3,0, 27);
		ObjEffect_SetLayer(obj, 3);
		ObjEffect_SetScale(obj,scx,scy);
			ascent(let i in 0..4)
			{
				ObjEffect_SetVertexColor(obj,i,255,255,200,200);
			}
		loop(10)
		{
			Obj_SetPosition(obj,GetPlayerX+R*cos(angle),GetPlayerY+R*sin(angle));
			ObjEffect_SetScale(obj,scx,scy);
			R-=BaseR/10;
			scx-=0.05;
			scy-=0.05;			
		yield;
		}
		Obj_Delete(obj);
}

task DrawShootBonus(type,DrawX,DrawY,No)//撮影時に表示される文字を表示。typeによって表示文字を変更
{
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, imgBorder);
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);

		if(type=="BasePoint")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -8);
		ObjEffect_SetVertexXY(obj, 1, 96,  -8);
		ObjEffect_SetVertexXY(obj, 2, 96, 8);
		ObjEffect_SetVertexXY(obj, 3, 0, 8);
		
		ObjEffect_SetVertexUV(obj, 0,  0,  195);
		ObjEffect_SetVertexUV(obj, 1,  96, 195);
		ObjEffect_SetVertexUV(obj, 2, 96,  211);
		ObjEffect_SetVertexUV(obj, 3, 0, 211);
		}
		if(type=="RedShot")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -8);
		ObjEffect_SetVertexXY(obj, 1, 86,  -8);
		ObjEffect_SetVertexXY(obj, 2, 86, 8);
		ObjEffect_SetVertexXY(obj, 3, 0, 8);
		
		ObjEffect_SetVertexUV(obj, 0,  0,  223);
		ObjEffect_SetVertexUV(obj, 1, 86, 223);
		ObjEffect_SetVertexUV(obj, 2, 86,  239);
		ObjEffect_SetVertexUV(obj, 3, 0, 239);
		}
		if(type=="BlueShot")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -8);
		ObjEffect_SetVertexXY(obj, 1, 89,  -8);
		ObjEffect_SetVertexXY(obj, 2, 89, 8);
		ObjEffect_SetVertexXY(obj, 3, 0, 8);
		
		ObjEffect_SetVertexUV(obj, 0,  102,  223);
		ObjEffect_SetVertexUV(obj, 1, 191, 223);
		ObjEffect_SetVertexUV(obj, 2, 191,  239);
		ObjEffect_SetVertexUV(obj, 3, 102, 239);
		}
		if(type=="GreenShot")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -8);
		ObjEffect_SetVertexXY(obj, 1, 106,  -8);
		ObjEffect_SetVertexXY(obj, 2, 106, 8);
		ObjEffect_SetVertexXY(obj, 3, 0, 8);
		
		ObjEffect_SetVertexUV(obj, 0,  0,  253);
		ObjEffect_SetVertexUV(obj, 1, 106, 253);
		ObjEffect_SetVertexUV(obj, 2, 106,  269);
		ObjEffect_SetVertexUV(obj, 3, 0, 269);
		}
		if(type=="YellowShot")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -8);
		ObjEffect_SetVertexXY(obj, 1, 109,  -8);
		ObjEffect_SetVertexXY(obj, 2, 109, 8);
		ObjEffect_SetVertexXY(obj, 3, 0, 8);
		
		ObjEffect_SetVertexUV(obj, 0,  120,  253);
		ObjEffect_SetVertexUV(obj, 1, 229, 253);
		ObjEffect_SetVertexUV(obj, 2, 229,  269);
		ObjEffect_SetVertexUV(obj, 3, 120, 269);
		}
		if(type=="PurpleShot")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -10);
		ObjEffect_SetVertexXY(obj, 1, 107,  -10);
		ObjEffect_SetVertexXY(obj, 2, 107, 10);
		ObjEffect_SetVertexXY(obj, 3, 0, 10);
		
		ObjEffect_SetVertexUV(obj, 0,  0,  280);
		ObjEffect_SetVertexUV(obj, 1, 107, 280);
		ObjEffect_SetVertexUV(obj, 2, 107,  301);
		ObjEffect_SetVertexUV(obj, 3, 0, 301);
		}
		if(type=="CyanShot")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -10);
		ObjEffect_SetVertexXY(obj, 1, 97,  -10);
		ObjEffect_SetVertexXY(obj, 2, 97, 10);
		ObjEffect_SetVertexXY(obj, 3, 0, 10);
		
		ObjEffect_SetVertexUV(obj, 0,  121,  280);
		ObjEffect_SetVertexUV(obj, 1, 218, 280);
		ObjEffect_SetVertexUV(obj, 2, 218,  301);
		ObjEffect_SetVertexUV(obj, 3, 121, 301);
		}

		if(type=="OrangeShot")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -9);
		ObjEffect_SetVertexXY(obj, 1, 118,  -9);
		ObjEffect_SetVertexXY(obj, 2, 118, 11);
		ObjEffect_SetVertexXY(obj, 3, 0, 11);
		
		ObjEffect_SetVertexUV(obj, 0,  126,  309);
		ObjEffect_SetVertexUV(obj, 1, 244, 309);
		ObjEffect_SetVertexUV(obj, 2, 244,  329);
		ObjEffect_SetVertexUV(obj, 3, 126, 329);
		}

		if(type=="WhiteShot")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -8);
		ObjEffect_SetVertexXY(obj, 1, 108,  -8);
		ObjEffect_SetVertexXY(obj, 2, 108, 8);
		ObjEffect_SetVertexXY(obj, 3, 0, 8);
		
		ObjEffect_SetVertexUV(obj, 0,  109,  196);
		ObjEffect_SetVertexUV(obj, 1, 217, 196);
		ObjEffect_SetVertexUV(obj, 2, 217,  212);
		ObjEffect_SetVertexUV(obj, 3, 109, 212);
		}

		if(type=="ColorfulShot")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -9);
		ObjEffect_SetVertexXY(obj, 1, 123,  -9);
		ObjEffect_SetVertexXY(obj, 2, 123, 9);
		ObjEffect_SetVertexXY(obj, 3, 0, 9);
		
		ObjEffect_SetVertexUV(obj, 0,  0,  309);
		ObjEffect_SetVertexUV(obj, 1, 123, 309);
		ObjEffect_SetVertexUV(obj, 2, 123,  326);
		ObjEffect_SetVertexUV(obj, 3, 0, 326);
		}
		if(type=="RainbowShot")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -8);
		ObjEffect_SetVertexXY(obj, 1, 124,  -8);
		ObjEffect_SetVertexXY(obj, 2, 124, 8);
		ObjEffect_SetVertexXY(obj, 3, 0, 8);
		
		ObjEffect_SetVertexUV(obj, 0,  0,  336);
		ObjEffect_SetVertexUV(obj, 1, 124, 336);
		ObjEffect_SetVertexUV(obj, 2, 124,  352);
		ObjEffect_SetVertexUV(obj, 3, 0, 352);
		}
		if(type=="MacroBonus")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -8);
		ObjEffect_SetVertexXY(obj, 1, 116,  -8);
		ObjEffect_SetVertexXY(obj, 2, 116, 8);
		ObjEffect_SetVertexXY(obj, 3, 0, 8);
		
		ObjEffect_SetVertexUV(obj, 0,  0,  365);
		ObjEffect_SetVertexUV(obj, 1, 116, 365);
		ObjEffect_SetVertexUV(obj, 2, 116,  381);
		ObjEffect_SetVertexUV(obj, 3, 0, 381);
		}
		if(type=="FrontShot")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -8);
		ObjEffect_SetVertexXY(obj, 1, 102,  -8);
		ObjEffect_SetVertexXY(obj, 2, 102, 8);
		ObjEffect_SetVertexXY(obj, 3, 0, 8);
		
		ObjEffect_SetVertexUV(obj, 0,  132,  364);
		ObjEffect_SetVertexUV(obj, 1,  234, 364);
		ObjEffect_SetVertexUV(obj, 2, 234,  380);
		ObjEffect_SetVertexUV(obj, 3, 132, 380);
		}
		if(type=="SideShot")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -8);
		ObjEffect_SetVertexXY(obj, 1, 92,  -8);
		ObjEffect_SetVertexXY(obj, 2, 92, 8);
		ObjEffect_SetVertexXY(obj, 3, 0, 8);
		
		ObjEffect_SetVertexUV(obj, 0,  0,  391);
		ObjEffect_SetVertexUV(obj, 1,  92, 391);
		ObjEffect_SetVertexUV(obj, 2, 92,  407);
		ObjEffect_SetVertexUV(obj, 3, 0, 407);
		}
		if(type=="BackShot")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -8);
		ObjEffect_SetVertexXY(obj, 1, 95,  -8);
		ObjEffect_SetVertexXY(obj, 2, 95, 8);
		ObjEffect_SetVertexXY(obj, 3, 0, 8);
		
		ObjEffect_SetVertexUV(obj, 0,  105,  391);
		ObjEffect_SetVertexUV(obj, 1,  200, 391);
		ObjEffect_SetVertexUV(obj, 2, 200,  407);
		ObjEffect_SetVertexUV(obj, 3, 105, 407);
		}
		if(type=="RiskPoint")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -8);
		ObjEffect_SetVertexXY(obj, 1, 88,  -8);
		ObjEffect_SetVertexXY(obj, 2, 88, 8);
		ObjEffect_SetVertexXY(obj, 3, 0, 8);
		
		ObjEffect_SetVertexUV(obj, 0,  0,  557);
		ObjEffect_SetVertexUV(obj, 1,  88, 557);
		ObjEffect_SetVertexUV(obj, 2, 88,  573);
		ObjEffect_SetVertexUV(obj, 3, 0, 573);
		}
		if(type=="SoloShot")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -8);
		ObjEffect_SetVertexXY(obj, 1,90,  -8);
		ObjEffect_SetVertexXY(obj, 2, 90, 8);
		ObjEffect_SetVertexXY(obj, 3, 0, 8);
		
		ObjEffect_SetVertexUV(obj, 0,  103,  557);
		ObjEffect_SetVertexUV(obj, 1,  193, 557);
		ObjEffect_SetVertexUV(obj, 2, 193,  573);
		ObjEffect_SetVertexUV(obj, 3, 103, 573);
		}
		if(type=="ClearShot")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -8);
		ObjEffect_SetVertexXY(obj, 1,103,  -8);
		ObjEffect_SetVertexXY(obj, 2, 103, 8);
		ObjEffect_SetVertexXY(obj, 3, 0, 8);
		
		ObjEffect_SetVertexUV(obj, 0,  0,  585);
		ObjEffect_SetVertexUV(obj, 1,  103, 585);
		ObjEffect_SetVertexUV(obj, 2, 103,  601);
		ObjEffect_SetVertexUV(obj, 3, 0, 601);
		}
		if(type=="OyajiBonus")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -9);
		ObjEffect_SetVertexXY(obj, 1,109,  -9);
		ObjEffect_SetVertexXY(obj, 2, 109, 10);
		ObjEffect_SetVertexXY(obj, 3, 0, 10);
		
		ObjEffect_SetVertexUV(obj, 0,  121,  614);
		ObjEffect_SetVertexUV(obj, 1,  230, 614);
		ObjEffect_SetVertexUV(obj, 2, 230,  633);
		ObjEffect_SetVertexUV(obj, 3, 121, 633);
		}
		if(type=="CatBonus")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -8);
		ObjEffect_SetVertexXY(obj, 1,92,  -8);
		ObjEffect_SetVertexXY(obj, 2, 92, 8);
		ObjEffect_SetVertexXY(obj, 3, 0, 8);
		
		ObjEffect_SetVertexUV(obj, 0,  0,  641);
		ObjEffect_SetVertexUV(obj, 1,  92, 641);
		ObjEffect_SetVertexUV(obj, 2, 92,  656);
		ObjEffect_SetVertexUV(obj, 3, 0, 656);
		}

		if(type=="MinimumBonus")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -8);
		ObjEffect_SetVertexXY(obj, 1,132,  -8);
		ObjEffect_SetVertexXY(obj, 2, 132, 8);
		ObjEffect_SetVertexXY(obj, 3, 0, 8);
		
		ObjEffect_SetVertexUV(obj, 0,  108,  641);
		ObjEffect_SetVertexUV(obj, 1,  240, 641);
		ObjEffect_SetVertexUV(obj, 2, 240,  656);
		ObjEffect_SetVertexUV(obj, 3, 108, 656);
		}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		if(type=="BossShot")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -8);
		ObjEffect_SetVertexXY(obj, 1, 95,  -8);
		ObjEffect_SetVertexXY(obj, 2, 95, 8);
		ObjEffect_SetVertexXY(obj, 3, 0, 8);
		
		ObjEffect_SetVertexUV(obj, 0,  0,  441);
		ObjEffect_SetVertexUV(obj, 1,  95, 441);
		ObjEffect_SetVertexUV(obj, 2, 95,  457);
		ObjEffect_SetVertexUV(obj, 3, 0, 457);
		}
		if(type=="TwoShot")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -8);
		ObjEffect_SetVertexXY(obj, 1, 93,  -8);
		ObjEffect_SetVertexXY(obj, 2, 93, 8);
		ObjEffect_SetVertexXY(obj, 3, 0, 8);
		
		ObjEffect_SetVertexUV(obj, 0,  110,  441);
		ObjEffect_SetVertexUV(obj, 1,  203, 441);
		ObjEffect_SetVertexUV(obj, 2, 203,  457);
		ObjEffect_SetVertexUV(obj, 3, 110, 457);
		}
		if(type=="NiceShot")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -8);
		ObjEffect_SetVertexXY(obj, 1, 96,  -8);
		ObjEffect_SetVertexXY(obj, 2, 96, 8);
		ObjEffect_SetVertexXY(obj, 3, 0, 8);
		
		ObjEffect_SetVertexUV(obj, 0,  111,  469);
		ObjEffect_SetVertexUV(obj, 1,  207, 469);
		ObjEffect_SetVertexUV(obj, 2, 207,  485);
		ObjEffect_SetVertexUV(obj, 3, 111, 485);
		}
		if(type=="SelfShot")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -8);
		ObjEffect_SetVertexXY(obj, 1, 94,  -8);
		ObjEffect_SetVertexXY(obj, 2, 94, 8);
		ObjEffect_SetVertexXY(obj, 3, 0, 8);
		
		ObjEffect_SetVertexUV(obj, 0,  0,  469);
		ObjEffect_SetVertexUV(obj, 1,  94, 469);
		ObjEffect_SetVertexUV(obj, 2, 94,  485);
		ObjEffect_SetVertexUV(obj, 3, 0, 485);
		}
		if(type=="EmptyShot")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -10);
		ObjEffect_SetVertexXY(obj, 1, 109,  -10);
		ObjEffect_SetVertexXY(obj, 2, 109, 10);
		ObjEffect_SetVertexXY(obj, 3, 0, 10);
		
		ObjEffect_SetVertexUV(obj, 0,  0,  495);
		ObjEffect_SetVertexUV(obj, 1,  109, 495);
		ObjEffect_SetVertexUV(obj, 2, 109,  515);
		ObjEffect_SetVertexUV(obj, 3, 0, 515);
		}
		if(type=="AngleBonus")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -8);
		ObjEffect_SetVertexXY(obj, 1, 90,  -8);
		ObjEffect_SetVertexXY(obj, 2, 90, 12);
		ObjEffect_SetVertexXY(obj, 3, 0, 12);
		
		ObjEffect_SetVertexUV(obj, 0,  124,  495);
		ObjEffect_SetVertexUV(obj, 1,  234, 495);
		ObjEffect_SetVertexUV(obj, 2, 234,  515);
		ObjEffect_SetVertexUV(obj, 3, 124, 515);
		}
		if(type=="DebugShot")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -9);
		ObjEffect_SetVertexXY(obj, 1, 90,  -9);
		ObjEffect_SetVertexXY(obj, 2, 90, 11);
		ObjEffect_SetVertexXY(obj, 3, 0, 11);
		
		ObjEffect_SetVertexUV(obj, 0,  2,  613);
		ObjEffect_SetVertexUV(obj, 1,  112, 613);
		ObjEffect_SetVertexUV(obj, 2, 112,  633);
		ObjEffect_SetVertexUV(obj, 3, 2, 633);
		}
		if(type=="ResultScore")
		{
		ObjEffect_SetVertexXY(obj, 0, 0, -8);
		ObjEffect_SetVertexXY(obj, 1, 121,  -8);
		ObjEffect_SetVertexXY(obj, 2, 121, 8);
		ObjEffect_SetVertexXY(obj, 3, 0, 8);
		
		ObjEffect_SetVertexUV(obj, 0,  0,  529);
		ObjEffect_SetVertexUV(obj, 1,  121, 529);
		ObjEffect_SetVertexUV(obj, 2, 121,  545);
		ObjEffect_SetVertexUV(obj, 3, 0, 545);
		}
		Obj_SetPosition(obj,DrawX,DrawY);
		ObjEffect_SetLayer(obj,3);
		ObjEffect_SetScale(obj, 0.6,0.5);
		loop(120)
		{
			ascent(let i in 0..4)
			{
				if(GetPlayerY<=GetCenterY)
				{
					ObjEffect_SetVertexColor(obj,i,130+25*cos(EnableAngle),255,200,200);
				}
				else
				{
					ObjEffect_SetVertexColor(obj,i,230+25*cos(EnableAngle),255,200,200);
				}
			}
		if(GetCommonDataDefault("ShootingEnd",false)==true){break;}
		yield;
		}
			ascent(let i in 0..4)
			{
				ObjEffect_SetVertexColor(obj,i,0,200,200,255);
			}
		while(GetCommonDataDefault("ShootingEnd",false)==false){yield;}
		if(GetCommonDataDefault("BunSpell",false)==false){Obj_Delete(obj);}
		if(DrawX<GetClipMaxX)
		{
		DrawX=GetCenterX;
		}
	//	ObjEffect_SetScale(obj, 0.6,0.70);
		Obj_SetPosition(obj,DrawX,DrawY+200);
		ObjEffect_SetLayer(obj,8);
		loop
		{
		
		if(PhotoSelectCorsol==No)
		{
		/*	loop((DrawY-GetCenterY+200)/5)
			{
				if(PhotoSelectCorsol!=No)
				{
				break;
				}
			if(GetCommonDataDefault("PhotoEraze",false)==true)
			{
				break;
			}
			yield;
			}
		*/	ascent(let i in 0..4)
			{
			//	ObjEffect_SetVertexColor(obj,i,255,200,200,255);
				ObjEffect_SetVertexColor(obj,i,255,255,200,200);
			}
		}
		else
		{
			ascent(let i in 0..4)
			{
				ObjEffect_SetVertexColor(obj,i,0,200,200,255);
			}
		}
			if(GetCommonDataDefault("PhotoEraze",false)==true)
			{
				break;
			}

		if(GetCommonDataDefault("SnapShooting",false)==true)
		{
			ascent(let i in 0..4)
			{
				ObjEffect_SetVertexColor(obj,i,0,200,200,255);
			}
		}

		yield;
		}
		Obj_Delete(obj);
}

task ShootBonumNumDraw(Num,DrawX,DrawY,let plus,let cross,No)//撮影時に表示される数字を表示。plusやcrossによって微妙に表示位置が修正される
{
let Pnum0=truncate(Num%10000000/1000000);
let Pnum1=truncate(Num%1000000/100000);
let Pnum2=truncate(Num%100000/10000);
let Pnum3=truncate(Num%10000/1000);
let Pnum4=truncate(Num%1000/100);
let Pnum5=truncate(Num%100/10);
let Pnum6=truncate(Num%10);
let figure=0;
		let obj0 = Obj_Create(OBJ_EFFECT);
		if(Pnum0!=0)
		{
		ObjEffect_SetTexture(obj0, imgBorder);
		ObjEffect_SetPrimitiveType(obj0, PRIMITIVE_TRIANGLEFAN);
		ObjEffect_SetRenderState(obj0, ADD); 
		ObjEffect_CreateVertex(obj0, 4);
		ObjEffect_SetVertexXY(obj0, 0, -7, -8);
		ObjEffect_SetVertexXY(obj0, 1, 7,  -8);
		ObjEffect_SetVertexXY(obj0, 2, 7, 8);
		ObjEffect_SetVertexXY(obj0, 3,  -7,  8);
		
		ObjEffect_SetVertexUV(obj0, 0,  2+Pnum0*14,  114);
		ObjEffect_SetVertexUV(obj0, 1,  14+Pnum0*14, 114);
		ObjEffect_SetVertexUV(obj0, 2, 14+Pnum0*14,  131);
		ObjEffect_SetVertexUV(obj0, 3, 2+Pnum0*14, 131);
		
		Obj_SetPosition(obj0,DrawX-8,DrawY);
		ObjEffect_SetLayer(obj0,3);
		ObjEffect_SetScale(obj0, 0.4,0.5);
		figure+=1;
		}

////////////////////////////////////////////////////////////////////////////////////
		let obj1 = Obj_Create(OBJ_EFFECT);
		if(Pnum1!=0 || Pnum0!=0)
		{
		ObjEffect_SetTexture(obj1, imgBorder);
		ObjEffect_SetPrimitiveType(obj1, PRIMITIVE_TRIANGLEFAN);
		ObjEffect_SetRenderState(obj1, ADD); 
		ObjEffect_CreateVertex(obj1, 4);
		ObjEffect_SetVertexXY(obj1, 0, -7, -8);
		ObjEffect_SetVertexXY(obj1, 1, 7,  -8);
		ObjEffect_SetVertexXY(obj1, 2, 7, 8);
		ObjEffect_SetVertexXY(obj1, 3,  -7,  8);
		
		ObjEffect_SetVertexUV(obj1, 0,  2+Pnum1*14,  114);
		ObjEffect_SetVertexUV(obj1, 1,  14+Pnum1*14, 114);
		ObjEffect_SetVertexUV(obj1, 2, 14+Pnum1*14,  131);
		ObjEffect_SetVertexUV(obj1, 3, 2+Pnum1*14, 131);
		
		Obj_SetPosition(obj1,DrawX,DrawY);
		ObjEffect_SetLayer(obj1,3);
		ObjEffect_SetScale(obj1, 0.4,0.5);
		figure+=1;
		}
////////////////////////////////////////////////////////////////////////////////////
		let obj2 = Obj_Create(OBJ_EFFECT);
		if(Pnum2!=0 || Pnum1!=0 || Pnum0!=0)
		{
		ObjEffect_SetTexture(obj2, imgBorder);
		ObjEffect_SetPrimitiveType(obj2, PRIMITIVE_TRIANGLEFAN);
		ObjEffect_SetRenderState(obj2, ADD); 
		ObjEffect_CreateVertex(obj2, 4);
		ObjEffect_SetVertexXY(obj2, 0, -7, -8);
		ObjEffect_SetVertexXY(obj2, 1, 7,  -8);
		ObjEffect_SetVertexXY(obj2, 2, 7, 8);
		ObjEffect_SetVertexXY(obj2, 3,  -7,  8);
		
		ObjEffect_SetVertexUV(obj2, 0,  2+Pnum2*14,  114);
		ObjEffect_SetVertexUV(obj2, 1,  14+Pnum2*14, 114);
		ObjEffect_SetVertexUV(obj2, 2, 14+Pnum2*14,  131);
		ObjEffect_SetVertexUV(obj2, 3, 2+Pnum2*14, 131);
		
		Obj_SetPosition(obj2,DrawX+8,DrawY);
		ObjEffect_SetLayer(obj2,3);
		ObjEffect_SetScale(obj2, 0.4,0.5);
		figure+=1;
		}
////////////////////////////////////////////////////////////////////////////////////
		let obj3 = Obj_Create(OBJ_EFFECT);
		if(Pnum3!=0 || Pnum2!=0 || Pnum1!=0 || Pnum0!=0)
		{
		ObjEffect_SetTexture(obj3, imgBorder);
		ObjEffect_SetPrimitiveType(obj3, PRIMITIVE_TRIANGLEFAN);
		ObjEffect_SetRenderState(obj3, ADD); 
		ObjEffect_CreateVertex(obj3, 4);
		ObjEffect_SetVertexXY(obj3, 0, -7, -8);
		ObjEffect_SetVertexXY(obj3, 1, 7,  -8);
		ObjEffect_SetVertexXY(obj3, 2, 7, 8);
		ObjEffect_SetVertexXY(obj3, 3,  -7,  8);
		
		ObjEffect_SetVertexUV(obj3, 0,  2+Pnum3*14,  114);
		ObjEffect_SetVertexUV(obj3, 1,  14+Pnum3*14, 114);
		ObjEffect_SetVertexUV(obj3, 2, 14+Pnum3*14,  131);
		ObjEffect_SetVertexUV(obj3, 3, 2+Pnum3*14, 131);
		
		Obj_SetPosition(obj3,DrawX+16,DrawY);
		ObjEffect_SetLayer(obj3,3);
		ObjEffect_SetScale(obj3, 0.4,0.5);
		figure+=1;
		}
///////////////////////////////////////////////////////////////////////////////////////
		let obj4 = Obj_Create(OBJ_EFFECT);
		if(Pnum4!=0 || Pnum3!=0 || Pnum2!=0 || Pnum1!=0 || Pnum0!=0 || cross==true)
		{
		ObjEffect_SetTexture(obj4, imgBorder);
		ObjEffect_SetPrimitiveType(obj4, PRIMITIVE_TRIANGLEFAN);
		ObjEffect_SetRenderState(obj4, ADD); 
		ObjEffect_CreateVertex(obj4, 4);
		ObjEffect_SetVertexXY(obj4, 0, -7, -8);
		ObjEffect_SetVertexXY(obj4, 1, 7,  -8);
		ObjEffect_SetVertexXY(obj4, 2, 7, 8);
		ObjEffect_SetVertexXY(obj4, 3,  -7,  8);
		
		ObjEffect_SetVertexUV(obj4, 0,  2+Pnum4*14,  114);
		ObjEffect_SetVertexUV(obj4, 1,  14+Pnum4*14, 114);
		ObjEffect_SetVertexUV(obj4, 2, 14+Pnum4*14,  131);
		ObjEffect_SetVertexUV(obj4, 3, 2+Pnum4*14, 131);
		if(cross)
		{
		Obj_SetPosition(obj4,DrawX+20,DrawY);
		}
		else
		{
		Obj_SetPosition(obj4,DrawX+24,DrawY);
		}
		ObjEffect_SetLayer(obj4,3);
		ObjEffect_SetScale(obj4, 0.4,0.5);
		figure+=1;
		}
//////////////////////////////////////////////////////////////////////////////////////////
		let obj5 = Obj_Create(OBJ_EFFECT);
		if(Pnum5!=0 || Pnum4!=0 || Pnum3!=0 || Pnum2!=0 || Pnum1!=0 || Pnum0!=0 || cross==true)
		{
		ObjEffect_SetTexture(obj5, imgBorder);
		ObjEffect_SetPrimitiveType(obj5, PRIMITIVE_TRIANGLEFAN);
		ObjEffect_SetRenderState(obj5, ADD); 
		ObjEffect_CreateVertex(obj5, 4);
		ObjEffect_SetVertexXY(obj5, 0, -7, -8);
		ObjEffect_SetVertexXY(obj5, 1, 7,  -8);
		ObjEffect_SetVertexXY(obj5, 2, 7, 8);
		ObjEffect_SetVertexXY(obj5, 3,  -7,  8);
		
		ObjEffect_SetVertexUV(obj5, 0,  2+Pnum5*14,  114);
		ObjEffect_SetVertexUV(obj5, 1,  14+Pnum5*14, 114);
		ObjEffect_SetVertexUV(obj5, 2, 14+Pnum5*14,  131);
		ObjEffect_SetVertexUV(obj5, 3, 2+Pnum5*14, 131);
		
		Obj_SetPosition(obj5,DrawX+32,DrawY);
		ObjEffect_SetLayer(obj5,3);
		ObjEffect_SetScale(obj5, 0.4,0.5);
		figure+=1;
		}
//////////////////////////////////////////////////////////////////////////////////////////
		let obj6 = Obj_Create(OBJ_EFFECT);
//		if(Pnum6!=0 || Pnum5!=0 || Pnum4!=0 || Pnum3!=0 || Pnum2!=0 || Pnum1!=0 || Pnum0!=0)
//		{
		ObjEffect_SetTexture(obj6, imgBorder);
		ObjEffect_SetPrimitiveType(obj6, PRIMITIVE_TRIANGLEFAN);
		ObjEffect_SetRenderState(obj6, ADD); 
		ObjEffect_CreateVertex(obj6, 4);
		ObjEffect_SetVertexXY(obj6, 0, -7, -8);
		ObjEffect_SetVertexXY(obj6, 1, 7,  -8);
		ObjEffect_SetVertexXY(obj6, 2, 7, 8);
		ObjEffect_SetVertexXY(obj6, 3,  -7,  8);
		
		ObjEffect_SetVertexUV(obj6, 0,  2+Pnum6*14,  114);
		ObjEffect_SetVertexUV(obj6, 1,  14+Pnum6*14, 114);
		ObjEffect_SetVertexUV(obj6, 2, 14+Pnum6*14,  131);
		ObjEffect_SetVertexUV(obj6, 3, 2+Pnum6*14, 131);
		
		Obj_SetPosition(obj6,DrawX+40,DrawY);
		ObjEffect_SetLayer(obj6,3);
		ObjEffect_SetScale(obj6, 0.4,0.5);
		figure+=1;
//		}
///////////////////////////////////////////////////////////////////////////////////////
		let obj7 = Obj_Create(OBJ_EFFECT);
if(plus==true)
{
		ObjEffect_SetTexture(obj7, imgBorder);
		ObjEffect_SetPrimitiveType(obj7, PRIMITIVE_TRIANGLEFAN);
		ObjEffect_SetRenderState(obj7, ADD); 
		ObjEffect_CreateVertex(obj7, 4);
		ObjEffect_SetVertexXY(obj7, 0, -7, -7);
		ObjEffect_SetVertexXY(obj7, 1, 7,  -7);
		ObjEffect_SetVertexXY(obj7, 2, 7, 7);
		ObjEffect_SetVertexXY(obj7, 3,  -7,  7);
		
		ObjEffect_SetVertexUV(obj7, 0,  193,  130);
		ObjEffect_SetVertexUV(obj7, 1,  206, 130);
		ObjEffect_SetVertexUV(obj7, 2, 206,  143);
		ObjEffect_SetVertexUV(obj7, 3, 193, 143);

		Obj_SetPosition(obj7,DrawX+40-figure*8,DrawY);
		ObjEffect_SetLayer(obj7,3);
		ObjEffect_SetScale(obj7, 0.4,0.5);
}
///////////////////////////////////////////////////////////////////////////////////////
		let obj8 = Obj_Create(OBJ_EFFECT);
if(cross==true)
{
		ObjEffect_SetTexture(obj8, imgBorder);
		ObjEffect_SetPrimitiveType(obj8, PRIMITIVE_TRIANGLEFAN);
		ObjEffect_SetRenderState(obj8, ADD); 
		ObjEffect_CreateVertex(obj8, 4);
		ObjEffect_SetVertexXY(obj8, 0, -7, -7);
		ObjEffect_SetVertexXY(obj8, 1, 7,  -7);
		ObjEffect_SetVertexXY(obj8, 2, 7, 7);
		ObjEffect_SetVertexXY(obj8, 3,  -7,  7);
		
		ObjEffect_SetVertexUV(obj8, 0,  209,  130);
		ObjEffect_SetVertexUV(obj8, 1,  222, 130);
		ObjEffect_SetVertexUV(obj8, 2, 222,  143);
		ObjEffect_SetVertexUV(obj8, 3, 209, 143);
		
		Obj_SetPosition(obj8,DrawX+36-figure*8,DrawY);
		ObjEffect_SetLayer(obj8,3);
		ObjEffect_SetScale(obj8, 0.4,0.5);
}
///////////////////////////////////////////////////////////////////////////////////////
		let obj9 = Obj_Create(OBJ_EFFECT);
if(cross==true)
{
		ObjEffect_SetTexture(obj9, imgBorder);
		ObjEffect_SetPrimitiveType(obj9, PRIMITIVE_TRIANGLEFAN);
		ObjEffect_SetRenderState(obj9, ADD); 
		ObjEffect_CreateVertex(obj9, 4);
		ObjEffect_SetVertexXY(obj9, 0, -3, -8);
		ObjEffect_SetVertexXY(obj9, 1, 3,  -8);
		ObjEffect_SetVertexXY(obj9, 2, 3, 8);
		ObjEffect_SetVertexXY(obj9, 3,  -3,  8);
		
		ObjEffect_SetVertexUV(obj9, 0,  2+10*14,  114);
		ObjEffect_SetVertexUV(obj9, 1,  8+10*14, 114);
		ObjEffect_SetVertexUV(obj9, 2, 8+10*14,  131);
		ObjEffect_SetVertexUV(obj9, 3, 2+10*14, 131);
		
		Obj_SetPosition(obj9,DrawX+50-figure*8,DrawY);
		ObjEffect_SetLayer(obj9,3);
		ObjEffect_SetScale(obj9, 0.4,0.5);
}
///////////////////////////////////////////////////////////////////////////////////////


	if(DrawX>GetClipMaxX)
	{
		if(GetCommonDataDefault("BunSpell",false)==false)
		{
			Obj_Delete(obj1);
			Obj_Delete(obj2);
			Obj_Delete(obj3);
			Obj_Delete(obj4);
			Obj_Delete(obj5);
			Obj_Delete(obj6);
			Obj_Delete(obj7);
			Obj_Delete(obj8);
			Obj_Delete(obj9);
		}
		ObjEffect_SetLayer(obj1,8);
		ObjEffect_SetLayer(obj2,8);
		ObjEffect_SetLayer(obj3,8);
		ObjEffect_SetLayer(obj4,8);
		ObjEffect_SetLayer(obj5,8);
		ObjEffect_SetLayer(obj6,8);
		ObjEffect_SetLayer(obj7,8);
		ObjEffect_SetLayer(obj8,8);
		ObjEffect_SetLayer(obj9,8);
	ObjEffect_SetScale(obj1, 0.6,0.70);
	ObjEffect_SetScale(obj2, 0.6,0.700);
	ObjEffect_SetScale(obj3, 0.6,0.70);
	ObjEffect_SetScale(obj4, 0.6,0.70);
	ObjEffect_SetScale(obj5, 0.6,0.70);
	ObjEffect_SetScale(obj6, 0.6,0.70);
	ObjEffect_SetScale(obj7, 0.6,0.70);
	ObjEffect_SetScale(obj8, 0.6,0.70);
	ObjEffect_SetScale(obj9, 0.6,0.70);
	}
	else
	{
			ascent(let i in 0..4)
			{
				ObjEffect_SetVertexColor(obj1,i,255,255,200,200);
				ObjEffect_SetVertexColor(obj2,i,255,255,200,200);
				ObjEffect_SetVertexColor(obj3,i,255,255,200,200);
				ObjEffect_SetVertexColor(obj4,i,255,255,200,200);
				ObjEffect_SetVertexColor(obj5,i,255,255,200,200);
				ObjEffect_SetVertexColor(obj6,i,255,255,200,200);
				ObjEffect_SetVertexColor(obj7,i,255,255,200,200);
				ObjEffect_SetVertexColor(obj8,i,255,255,200,200);
				ObjEffect_SetVertexColor(obj9,i,255,255,200,200);
			}
		loop(120)
		{
			if(GetPlayerY<GetCenterY)
			{
			ascent(let i in 0..4)
			{
				ObjEffect_SetVertexColor(obj1,i,130+25*cos(EnableAngle),255,200,200);
				ObjEffect_SetVertexColor(obj2,i,130+25*cos(EnableAngle),255,200,200);
				ObjEffect_SetVertexColor(obj3,i,130+25*cos(EnableAngle),255,200,200);
				ObjEffect_SetVertexColor(obj4,i,130+25*cos(EnableAngle),255,200,200);
				ObjEffect_SetVertexColor(obj5,i,130+25*cos(EnableAngle),255,200,200);
				ObjEffect_SetVertexColor(obj6,i,130+25*cos(EnableAngle),255,200,200);
				ObjEffect_SetVertexColor(obj7,i,130+25*cos(EnableAngle),255,200,200);
				ObjEffect_SetVertexColor(obj8,i,130+25*cos(EnableAngle),255,200,200);
				ObjEffect_SetVertexColor(obj9,i,130+25*cos(EnableAngle),255,200,200);
			}
			}
			else
			{
			ascent(let i in 0..4)
			{
				ObjEffect_SetVertexColor(obj1,i,230+25*cos(EnableAngle),255,200,200);
				ObjEffect_SetVertexColor(obj2,i,230+25*cos(EnableAngle),255,200,200);
				ObjEffect_SetVertexColor(obj3,i,230+25*cos(EnableAngle),255,200,200);
				ObjEffect_SetVertexColor(obj4,i,230+25*cos(EnableAngle),255,200,200);
				ObjEffect_SetVertexColor(obj5,i,230+25*cos(EnableAngle),255,200,200);
				ObjEffect_SetVertexColor(obj6,i,230+25*cos(EnableAngle),255,200,200);
				ObjEffect_SetVertexColor(obj7,i,230+25*cos(EnableAngle),255,200,200);
				ObjEffect_SetVertexColor(obj8,i,230+25*cos(EnableAngle),255,200,200);
				ObjEffect_SetVertexColor(obj9,i,230+25*cos(EnableAngle),255,200,200);
			}
			}
		if(GetCommonDataDefault("ShootingEnd",false)==true){break;}
		yield;
		}
			ascent(let i in 0..4)
			{
				ObjEffect_SetVertexColor(obj1,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj2,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj3,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj4,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj5,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj6,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj7,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj8,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj9,i,0,200,200,255);
			}
	}
		while(GetCommonDataDefault("ShootingEnd",false)==false){yield;}
		if(DrawX<GetClipMaxX)
		{
		DrawX=GetCenterX+100;
		let ADY=200;
		Obj_SetPosition(obj1,DrawX,DrawY+ADY);
		Obj_SetPosition(obj2,DrawX+8,DrawY+ADY);
		Obj_SetPosition(obj3,DrawX+16,DrawY+ADY);
		if(cross)
		{
		Obj_SetPosition(obj4,DrawX+20,DrawY+ADY);
		}
		else
		{
		Obj_SetPosition(obj4,DrawX+24,DrawY+ADY);
		}
		Obj_SetPosition(obj5,DrawX+32,DrawY+ADY);
		Obj_SetPosition(obj6,DrawX+40,DrawY+ADY);
		Obj_SetPosition(obj7,DrawX+40-figure*8,DrawY+ADY);
		Obj_SetPosition(obj8,DrawX+36-figure*8,DrawY+ADY);
		Obj_SetPosition(obj9,DrawX+50-figure*8,DrawY+ADY);
		}
		ObjEffect_SetLayer(obj1,8);
		ObjEffect_SetLayer(obj2,8);
		ObjEffect_SetLayer(obj3,8);
		ObjEffect_SetLayer(obj4,8);
		ObjEffect_SetLayer(obj5,8);
		ObjEffect_SetLayer(obj6,8);
		ObjEffect_SetLayer(obj7,8);
		ObjEffect_SetLayer(obj8,8);
		ObjEffect_SetLayer(obj9,8);

/*	ObjEffect_SetScale(obj1, 0.6,0.50);
	ObjEffect_SetScale(obj2, 0.6,0.50);
	ObjEffect_SetScale(obj3, 0.6,0.70);
	ObjEffect_SetScale(obj4, 0.6,0.70);
	ObjEffect_SetScale(obj5, 0.6,0.70);
	ObjEffect_SetScale(obj6, 0.6,0.70);
	ObjEffect_SetScale(obj7, 0.6,0.70);
	ObjEffect_SetScale(obj8, 0.6,0.70);
	ObjEffect_SetScale(obj9, 0.6,0.70);	*/

	if(DrawX>GetClipMaxX)
	{
		loop
		{
		
		if(PhotoSelectCorsol!=No)
		{
		/*	loop(DrawY/5)
			{
				if(PhotoSelectCorsol!=No)
				{
				break;
				}
			if(GetCommonDataDefault("PhotoEraze",false)==true)
			{
				break;
			}
			yield;
			}
		*/	ascent(let i in 0..4)
			{
				ObjEffect_SetVertexColor(obj1,i,255,255,255,255);
				ObjEffect_SetVertexColor(obj2,i,255,255,255,255);
				ObjEffect_SetVertexColor(obj3,i,255,255,255,255);
				ObjEffect_SetVertexColor(obj4,i,255,255,255,255);
				ObjEffect_SetVertexColor(obj5,i,255,255,255,255);
				ObjEffect_SetVertexColor(obj6,i,255,255,255,255);
				ObjEffect_SetVertexColor(obj7,i,255,255,255,255);
				ObjEffect_SetVertexColor(obj8,i,255,255,255,255);
				ObjEffect_SetVertexColor(obj9,i,255,255,255,255);
			}
		}
		else
		{
			ascent(let i in 0..4)
			{
				ObjEffect_SetVertexColor(obj1,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj2,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj3,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj4,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj5,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj6,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj7,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj8,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj9,i,0,200,200,255);
			}
		}
			if(GetCommonDataDefault("PhotoEraze",false)==true)
			{
				break;
			}
		yield;
		}
	}
///////////////////////////////////////////////////////////////////////////////////
		loop
		{
		
		if(PhotoSelectCorsol==No)
		{
		/*	loop((DrawY-GetCenterY+160)/5)
			{
				if(PhotoSelectCorsol!=No)
				{
				break;
				}
			if(GetCommonDataDefault("PhotoEraze",false)==true)
			{
				break;
			}
			yield;
			}
		*/	ascent(let i in 0..4)
			{
				ObjEffect_SetVertexColor(obj1,i,255,255,200,200);
				ObjEffect_SetVertexColor(obj2,i,255,255,200,200);
				ObjEffect_SetVertexColor(obj3,i,255,255,200,200);
				ObjEffect_SetVertexColor(obj4,i,255,255,200,200);
				ObjEffect_SetVertexColor(obj5,i,255,255,200,200);
				ObjEffect_SetVertexColor(obj6,i,255,255,200,200);
				ObjEffect_SetVertexColor(obj7,i,255,255,200,200);
				ObjEffect_SetVertexColor(obj8,i,255,255,200,200);
				ObjEffect_SetVertexColor(obj9,i,255,255,200,200);
			}
		}
		else
		{
			ascent(let i in 0..4)
			{
				ObjEffect_SetVertexColor(obj1,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj2,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj3,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj4,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj5,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj6,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj7,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj8,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj9,i,0,200,200,255);
			}
		}
			if(GetCommonDataDefault("PhotoEraze",false)==true)
			{
				break;
			}

		if(GetCommonDataDefault("SnapShooting",false)==true)
		{
			ascent(let i in 0..4)
			{
				ObjEffect_SetVertexColor(obj1,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj2,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj3,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj4,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj5,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj6,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj7,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj8,i,0,200,200,255);
				ObjEffect_SetVertexColor(obj9,i,0,200,200,255);	
			}	
		}
		yield;
		}
		Obj_Delete(obj0);
		Obj_Delete(obj1);
		Obj_Delete(obj2);
		Obj_Delete(obj3);
		Obj_Delete(obj4);
		Obj_Delete(obj5);
		Obj_Delete(obj6);

		Obj_Delete(obj7);

		Obj_Delete(obj8);

		Obj_Delete(obj9);
}