
@Initialize
{
	TMain;
}

@MainLoop
{
	yield;
}

@Event
{
	alternative(GetEventType())
	case(EV_REQUEST_LIFE)
	{
		SetScriptResult(1500);//ライフを1500に設定
	}
	case(EV_REQUEST_TIMER)
	{
		SetScriptResult(120);//時間制限を60秒に設定
	}
}

task TMain
{
/*
	let BulletArray=GetShotIdInCircleA2(320,240,600,TARGET_ENEMY);
	ascent(i in 0..length(BulletArray))
	{
	//let obj=CreateItemU1(1,ObjRender_GetX(BulletArray[i]),ObjRender_GetY(BulletArray[i]),1000);
	CreateItem(ObjRender_GetX(BulletArray[i]),ObjRender_GetY(BulletArray[i]),2);
	//CreateItemA1(ITEM_POINT_S,ObjRender_GetX(BulletArray[i]),ObjRender_GetY(BulletArray[i]),10000);
	}
	//DeleteShotAll(TYPE_ALL,TYPE_IMMEDIATE);
	let ex=GetScriptArgument(3);
	let ey=GetScriptArgument(4);
	let Item=[GetScriptArgument(0),GetScriptArgument(1),GetScriptArgument(2)];
	if(Item[0]<=20)
	{
	ascent(i in 0..Item[0])
	{
		CreateItem(ex+40*cos(i*360/Item[0]),ey+40*sin(i*360/Item[0]),1);
	}
	}
	else
	{
	ascent(i in 0..20)
	{
		CreateItem(ex+40*cos(i*360/20),ey+40*sin(i*360/20),1);
	}
	ascent(i in 20..Item[0])
	{
		CreateItem(ex+65*cos(i*360/(20-Item[0])),ey+65*sin(i*360/(20-Item[0])),1);
	}
	}
	if(Item[2]==0)
	{
	ascent(i in 0..Item[1])
	{
		CreateItem(ex+15*cos(i*360/Item[1]),ey+15*sin(i*360/Item[1]),3);
	}
	}
	else if(Item[1]==0)
	{
	ascent(i in 0..Item[2])
	{
		CreateItem(ex+15*cos(i*360/Item[2]),ey+15*sin(i*360/Item[2]),5);
	}
	}
	else
	{
		let way=Item[1]+Item[2];
		ascent(i in 0..Item[2]+Item[1])
		{
			CreateItem(ex+15*cos(i*360/way),ey+15*sin(i*360/way),3+2*(i%2));
		}
		
	}
*/
	loop(600){yield;}
	CloseScript(GetOwnScriptID());
}
/*
task CreateItem(obj,x,y)
{
	ObjRender_SetPosition(obj,x,y,0);
	ObjMove_SetSpeed(obj,0);
	while(!Obj_IsDeleted(obj))
	{
		ObjRender_SetX(obj,ObjRender_GetX(obj)+1);
		yield;
	}

}
*/