#e[Player]
#ScriptVersion[2]
#Menu[~AEXJ[bg]
#Text[Ver.0.01Em[Vbg
UЗ́F
Ú͈F
xF
ᑬxF
\́F̓P
@@@@@zS̈Ӓn
SV^̎@B
_[W[gQ[W܂ƌāB]
#Image[.\img\image_Remi.png]
#ReplayName[RemiNS]

script_player_main
{
	let current=GetCurrentScriptDirectory();
	let imgRemi=current~"img\Remi.png";
	let imgDG=current~"img\Rate.png";
	let SubShot=false;
	let Animation=0;
	let AnimaX=0;
	let AnimaY=0;
	let Drate=0;
	let DrateF=false;
	let DrateCountA=0;
	let DrateCountB=0;

	@Initialize{	
		SetPlayerLifeImage(imgRemi,0,0,39,42);
		LoadGraphic(imgRemi);
		LoadGraphic(imgDG);
		SetSpeed(5,2);
		SetRibirthFrame(7);
		SetInitialBombCount(0);
		SetItemCollectLine(125);
		SetRateScoreSystemEnable(false);
		Anima;
	}

	@MainLoop{
		if(DrateCountA<GetGraze){
			Drate++;
			DrateCountB=0;
			DrateCountA++;
		}
		if(Drate>=0){
			DrateCountB++;
			if(DrateCountB>=200){
				Drate--;
			}
		}

		if(Drate<=0){
			DrateCountA=GetGraze;
			Drate=0;
		}
		if(Drate>199){
			Drate=200;
			ShootDownPlayer;
		}

		SetIntersectionCircle(GetPlayerX,GetPlayerY,1.5);
		yield;
	}

	@Missed{
		DrateCountA=GetGraze;
		Drate=0;
	}
	
	@DrawLoop{
		SetAlpha(255);
		if(Drate<130){SetColor(0,255,125);}
		else if(Drate<170&&Drate>=130){SetColor(255,255,0);}
		else if(Drate>=170){SetColor(255,0,0);}
		SetTexture(imgDG);
		SetRenderState(ALPHA);
		SetGraphicRect(1,23,202,40);
		SetGraphicScale(Drate*0.005,1.1);
		DrawGraphic(212+Drate/2,451);
		SetGraphicRect(0,0,203,21);
		SetGraphicScale(1,1);
		SetColor(255,255,255);
		DrawGraphic(312,450);

		SetTexture(imgRemi);
		if(GetKeyState(VK_LEFT)==KEY_PUSH||GetKeyState(VK_LEFT)==KEY_HOLD){SetGraphicRect(40,0+43*Animation,79,42+43*Animation);}
		else if(GetKeyState(VK_RIGHT)==KEY_PUSH||GetKeyState(VK_RIGHT)==KEY_HOLD){SetGraphicRect(80,0+43*Animation,119,42+43*Animation);}
		else {SetGraphicRect(0,0+43*Animation,39,42+43*Animation);}
		DrawGraphic(GetPlayerX(),GetPlayerY());}

	@Finalize{DeleteGraphic(imgRemi);}

	task Anima{
		loop{
		Animation=0;
		loop(10){yield;}
		Animation=1;
		loop(10){yield;}
		Animation=2;
		loop(10){yield;}
		}
	}

	task Anima2{
		loop(10){
		AnimaX=AnimaX-1;
		AnimaY=AnimaY+1;
		yield;}
		loop(120){yield;}
		loop(10){
		AnimaX=AnimaX-1;
		AnimaY=AnimaY+1;
		yield;}
	}
}

}