#Title[됌뎸봍쀓]
#Text[됌뎸봍쀓궻뱋뤾]
#BackGround[User]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main
{
        let count=0;
        let cx=GetCenterX();
        let cy=GetCenterY();
        let sxy=1;
        let sp=0;
        let csd=GetCurrentScriptDirectory;
        let imgBoss=csd~"img\ExOrin.png";

	@Initialize
	{
	SetLife(1);
	SetTimer(999);
        SetDamageRate(0,0);
        SetInvincibility(0);
	SetX(478);
	SetY(50);
        SetMovePosition02(GetCenterX(),150,50);
	LoadGraphic(imgBoss);
	SetEnemyMarker(true);
	}
	
	@MainLoop
	{
	if(count==100){
		Concentration01(100);
		}
	if(count>=150&&count<=200){
		sp+=5;
		sxy+=0.01;
		}
	if(count==201){
		AddLife(-1000);
		}
	SetCollisionA(GetX,GetY,10);
	SetCollisionB(GetX,GetY,10);
        count++;
        yield;
	}
	
        @DrawLoop {
		SetRenderState(ALPHA);
		SetTexture(imgBoss);
		SetGraphicScale(sxy,sxy);
		SetAlpha(255-sp);
		SetGraphicRect(0,256,127,382);
		DrawGraphic(GetX(),GetY());
		SetTexture(imgBoss);
		SetGraphicScale(2.51-sxy,2.51-sxy);
		SetAlpha(sp);
		SetGraphicRect(0,128,127,255);
		DrawGraphic(GetX(),GetY());
	}
        
        @Finalize
        {
		DeleteGraphic(imgBoss);
        } 
}