#e[Player]	
#ScriptVersion[2]
#Menu[Daisenpu]
#Text[cCEz[N
wx
@̃CN

:[Vbg]
\:[wp[][{o[]]

#Image[.\img\Select.png]
#ReplayName[THawk]

script_player_main{
	let current = GetCurrentScriptDirectory;
	let Img = [//摜
			current~".\img\PlayerImg.png",//@
			current~".\img\ObjImg.png",
			current~".\img\OptionImg.png",//x@
			current~".\img\BomberImg.png",//{o[
			];
	let SE = [
			current~".\se\se1.wav",
			current~".\se\se2.wav",
			];
	let counter = 0;
	let KeyHold = 0;
	let Hm =0;

	@Initialize{
		ascent(n in 0..length(Img)){LoadGraphic(Img[n]);}
		ascent(n in 0..length(SE)){LoadSE(SE[n]);}
		SetPlayerLifeImage(Img[1],0,0,50,50);
		
		SetSpeed(5,2.5);
		SetGrazeCircle(80);
		SetAutoEffect(false);
		KeyCheck;
	}
	@MainLoop{
		SetIntersectionCircle(GetPlayerX,GetPlayerY-6,5);
		Clock;
		if(RapShot){MainShot;}
		
		if(Right){Hm++;}
		else if(Left){Hm--;}
		if(Hm>  45){Hm=  45;}
		if(Hm< -45){Hm= -45;}
		
		if(User){Helper;}
		counter++;
		yield;
	}
	@Missed{MainLoop;}
	
	@SpellCard{
		UseSpellCard("Bomber",[Img[3]]);
		PlaySE(SE[1]);
	}
	
	@DrawLoop{
		if(Right){//@
			if(KeyHold>30){PlayerImg(x[1]*m,x[2],x[1]*(m+1),x[3]);}
			else{PlayerImg(x[1]*m,x[1],x[1]*(m+1),x[2]);}
		}
		else if(Left){
			if(KeyHold>30){PlayerImg(x[1]*m,x[4],x[1]*(m+1),x[5]);}
			else{PlayerImg(x[1]*m,x[3],x[1]*(m+1),x[4]);}
			}
		else{
			PlayerImg(x[1]*m,x[0],x[1]*(m+1),x[1]);
			KeyHold=0;
		}
		if(RapSlow){ObjImg(GetPlayerX,GetPlayerY-6,3,53,15,65);}
		KeyHold++;
		yield;
	}
	
	@Finalize{
		ascent(n in 0..length(SE)){DeleteSE(SE[n]);}
		ascent(n in 0..length(Img)){DeleteGraphic(Img[n]);}
	}
#include_function ".\txt\ImageObj.txt"
#include_function ".\txt\KeyObj.txt"
#include_function ".\txt\ShotObj.txt"
#include_function ".\txt\OptionObj.txt"
}
#include_script".\txt\BombOdj.txt"