#東方弾幕風
#Title[弾幕制作テスト]
#Text[自機狙い多方向両回転N-Way弾]
#Image[]
#ScriptVersion[2]
	
script_enemy_main
{
	let count;//弾を出す間隔を制御するための変数;
	let cx;//変数cxに真ん中の座標を代入;
	@Initialize
	{
		count=0;//弾を出す間隔を制御するための変数;
		cx=GetCenterX();//変数cxに真ん中の座標を代入;
		SetLife(100);//敵のライフを1000に
		SetDamageRate(10,0);
		SetGraphicRect(64,1,127,64);//描画元の矩形を(64,1)-(127,64)に設定
		LoadGraphic("script\img\ExRumia.png");//script\img\ExRumia.jpgをテクスチャに読みこみ
		SetMovePosition02(cx,60,60);//座標(cx,60)に60フレームで移動
		Shot1;
		Shot2;
		Shot3;
		Shot4;
		Shot5;
		Shot6;
		Shot7;
		Shot8;
		Shot9;
		Shot10;
		Shot11;
		Shot12;
		Shot13;
		Shot14;
		Shot15;
		Shot16;
		Shot17;
		Shot18;
		Shot19;
		Shot20;
		Shot21;
		Shot22;
		Shot23;
		Shot24;
		Shot25;
		Shot26;
		Shot27;
		Shot28;
		Shot29;
		Shot30;
		Shot31;
		Shot32;
		Shot33;
		Shot34;
		Shot35;
		Shot36;
	}
		
	@MainLoop
	{
		yield;
		SetCollisionA(GetX(),GetY(),32);//敵の座標に当たり判定を登録
		SetCollisionB(GetX(),GetY(),24);//敵の座標に当たり判定(体当たり用)を登録
		count++;//1フレーム毎にcountが1増加
	}
	task Shot1
	{
		SetShotDirectionType(PLAYER);
		let angle1=-10;
		loop{
			CreateShot01(GetX(),GetY(),5,angle1,BLUE23,0);
			angle1+=10;
		loop(4){yield;}
		}
	}
	task Shot2
	{
		SetShotDirectionType(PLAYER);
		let angle2=0;
		loop{
			CreateShot01(GetX(),GetY(),5,angle2,BLUE23,0);
			angle2+=10;
		loop(4){yield;}
		}
	}
	task Shot3
	{
		SetShotDirectionType(PLAYER);
		let angle3=10;
		loop{
			CreateShot01(GetX(),GetY(),5,angle3,BLUE23,0);
			angle3+=10;
		loop(4){yield;}
		}
	}
	task Shot4
	{
		SetShotDirectionType(PLAYER);
		let angle4=110;
		loop{
			CreateShot01(GetX(),GetY(),5,angle4,GREEN23,0);
			angle4+=10;
		loop(4){yield;}
		}
	}
	task Shot5
	{
		SetShotDirectionType(PLAYER);
		let angle5=120;
		loop{
			CreateShot01(GetX(),GetY(),5,angle5,GREEN23,0);
			angle5+=10;
		loop(4){yield;}
		}
	}
	task Shot6
	{
		SetShotDirectionType(PLAYER);
		let angle6=130;
		loop{
			CreateShot01(GetX(),GetY(),5,angle6,GREEN23,0);
			angle6+=10;
		loop(4){yield;}
		}
	}
	task Shot7
	{
		SetShotDirectionType(PLAYER);
		let angle7=230;
		loop{
			CreateShot01(GetX(),GetY(),5,angle7,RED23,0);
			angle7+=10;
		loop(4){yield;}
		}
	}
	task Shot8
	{
		SetShotDirectionType(PLAYER);
		let angle8=240;
		loop{
			CreateShot01(GetX(),GetY(),5,angle8,RED23,0);
			angle8+=10;
		loop(4){yield;}
		}
	}
	task Shot9
	{
		SetShotDirectionType(PLAYER);
		let angle9=250;
		loop{
			CreateShot01(GetX(),GetY(),5,angle9,RED23,0);
			angle9+=10;
		loop(4){yield;}
		}
	}
	task Shot10
	{
		SetShotDirectionType(PLAYER);
		let angle10=170;
		loop{
			CreateShot01(GetX(),GetY(),5,angle10,BLUE23,0);
			angle10+=10;
		loop(4){yield;}
		}
	}
	task Shot11
	{
		SetShotDirectionType(PLAYER);
		let angle11=180;
		loop{
			CreateShot01(GetX(),GetY(),5,angle11,BLUE23,0);
			angle11+=10;
		loop(4){yield;}
		}
	}
	task Shot12
	{
		SetShotDirectionType(PLAYER);
		let angle12=190;
		loop{
			CreateShot01(GetX(),GetY(),5,angle12,BLUE23,0);
			angle12+=10;
		loop(4){yield;}
		}
	}
	task Shot13
	{
		SetShotDirectionType(PLAYER);
		let angle13=290;
		loop{
			CreateShot01(GetX(),GetY(),5,angle13,GREEN23,0);
			angle13+=10;
		loop(4){yield;}
		}
	}
	task Shot14
	{
		SetShotDirectionType(PLAYER);
		let angle14=300;
		loop{
			CreateShot01(GetX(),GetY(),5,angle14,GREEN23,0);
			angle14+=10;
		loop(4){yield;}
		}
	}
	task Shot15
	{
		SetShotDirectionType(PLAYER);
		let angle15=310;
		loop{
			CreateShot01(GetX(),GetY(),5,angle15,GREEN23,0);
			angle15+=10;
		loop(4){yield;}
		}
	}
	task Shot16
	{
		SetShotDirectionType(PLAYER);
		let angle16=50;
		loop{
			CreateShot01(GetX(),GetY(),5,angle16,RED23,0);
			angle16+=10;
		loop(4){yield;}
		}
	}
	task Shot17
	{
		SetShotDirectionType(PLAYER);
		let angle17=60;
		loop{
			CreateShot01(GetX(),GetY(),5,angle17,RED23,0);
			angle17+=10;
		loop(4){yield;}
		}
	}
	task Shot18
	{
		SetShotDirectionType(PLAYER);
		let angle18=70;
		loop{
			CreateShot01(GetX(),GetY(),5,angle18,RED23,0);
			angle18+=10;
		loop(4){yield;}
		}
	}
	task Shot19
	{
		SetShotDirectionType(PLAYER);
		let angle19=-10;
		loop{
			CreateShot01(GetX(),GetY(),5,angle19,BLUE23,0);
			angle19-=10;
		loop(4){yield;}
		}
	}
	task Shot20
	{
		SetShotDirectionType(PLAYER);
		let angle20=0;
		loop{
			CreateShot01(GetX(),GetY(),5,angle20,BLUE23,0);
			angle20-=10;
		loop(4){yield;}
		}
	}
	task Shot21
	{
		SetShotDirectionType(PLAYER);
		let angle21=10;
		loop{
			CreateShot01(GetX(),GetY(),5,angle21,BLUE23,0);
			angle21-=10;
		loop(4){yield;}
		}
	}
	task Shot22
	{
		SetShotDirectionType(PLAYER);
		let angle22=110;
		loop{
			CreateShot01(GetX(),GetY(),5,angle22,GREEN23,0);
			angle22-=10;
		loop(4){yield;}
		}
	}
	task Shot23
	{
		SetShotDirectionType(PLAYER);
		let angle23=120;
		loop{
			CreateShot01(GetX(),GetY(),5,angle23,GREEN23,0);
			angle23-=10;
		loop(4){yield;}
		}
	}
	task Shot24
	{
		SetShotDirectionType(PLAYER);
		let angle24=130;
		loop{
			CreateShot01(GetX(),GetY(),5,angle24,GREEN23,0);
			angle24-=10;
		loop(4){yield;}
		}
	}
	task Shot25
	{
		SetShotDirectionType(PLAYER);
		let angle25=230;
		loop{
			CreateShot01(GetX(),GetY(),5,angle25,RED23,0);
			angle25-=10;
		loop(4){yield;}
		}
	}
	task Shot26
	{
		SetShotDirectionType(PLAYER);
		let angle26=240;
		loop{
			CreateShot01(GetX(),GetY(),5,angle26,RED23,0);
			angle26-=10;
		loop(4){yield;}
		}
	}
	task Shot27
	{
		SetShotDirectionType(PLAYER);
		let angle27=250;
		loop{
			CreateShot01(GetX(),GetY(),5,angle27,RED23,0);
			angle27-=10;
		loop(4){yield;}
		}
	}
	task Shot28
	{
		SetShotDirectionType(PLAYER);
		let angle28=170;
		loop{
			CreateShot01(GetX(),GetY(),5,angle28,BLUE23,0);
			angle28-=10;
		loop(4){yield;}
		}
	}
	task Shot29
	{
		SetShotDirectionType(PLAYER);
		let angle29=180;
		loop{
			CreateShot01(GetX(),GetY(),5,angle29,BLUE23,0);
			angle29-=10;
		loop(4){yield;}
		}
	}
	task Shot30
	{
		SetShotDirectionType(PLAYER);
		let angle30=190;
		loop{
			CreateShot01(GetX(),GetY(),5,angle30,BLUE23,0);
			angle30-=10;
		loop(4){yield;}
		}
	}
	task Shot31
	{
		SetShotDirectionType(PLAYER);
		let angle31=290;
		loop{
			CreateShot01(GetX(),GetY(),5,angle31,GREEN23,0);
			angle31-=10;
		loop(4){yield;}
		}
	}
	task Shot32
	{
		SetShotDirectionType(PLAYER);
		let angle32=300;
		loop{
			CreateShot01(GetX(),GetY(),5,angle32,GREEN23,0);
			angle32-=10;
		loop(4){yield;}
		}
	}
	task Shot33
	{
		SetShotDirectionType(PLAYER);
		let angle33=310;
		loop{
			CreateShot01(GetX(),GetY(),5,angle33,GREEN23,0);
			angle33-=10;
		loop(4){yield;}
		}
	}
	task Shot34
	{
		SetShotDirectionType(PLAYER);
		let angle34=50;
		loop{
			CreateShot01(GetX(),GetY(),5,angle34,RED23,0);
			angle34-=10;
		loop(4){yield;}
		}
	}
	task Shot35
	{
		SetShotDirectionType(PLAYER);
		let angle35=60;
		loop{
			CreateShot01(GetX(),GetY(),5,angle35,RED23,0);
			angle35-=10;
		loop(4){yield;}
		}
	}
	task Shot36
	{
		SetShotDirectionType(PLAYER);
		let angle36=70;
		loop{
			CreateShot01(GetX(),GetY(),5,angle36,RED23,0);
			angle36-=10;
		loop(4){yield;}
		}
	}
	@DrawLoop
	{
		SetTexture("script\img\ExRumia.png");//描画元テクスチャを設定
		DrawGraphic(GetX(),GetY())//敵の座標にExルーミアを描画;
	}
	
	@Finalize
	{
		DeleteGraphic("script\img\ExRumia.png");//読みこんだテクスチャを破棄
	}
}
