#Title[西行寺幽々子]
#Text[西行寺幽々子の待機]
#BackGround[User]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main
{
        let count=0;
        let cx=GetCenterX();
        let cy=GetCenterY();
	let AnimationA=0;
	let AnimationB=0;
	let AnimationC=0;
        let csd     = GetCurrentScriptDirectory;
        let imgBoss =csd~"img\dot_yuyuko.png";

	@Initialize{
	SetLife(1);
	SetTimer(999);
        SetDamageRate(0,0);
        SetInvincibility(100);
	LoadGraphic(imgBoss);
	SetEnemyMarker(true);
        TAnime;
	}
	
	@MainLoop
	{
	if(count==50){
		AddLife(-3000);
		}
        SetCollisionB(GetX(),GetY(),18);
	SetCollisionA(GetX(),GetY(),18);
        count++;
        yield;
	}
	
        @DrawLoop {
		SetRenderState(ALPHA);
		SetTexture(imgBoss);
		SetGraphicScale(1,1);
		SetAlpha(255);
		SetGraphicRect(128*AnimationC,128*AnimationB,127+128*AnimationC,127+128*AnimationB);
		DrawGraphic(GetX(),GetY());
	}
        
        @Finalize
        {
		DeleteGraphic(imgBoss);
        }

	task TAnime{
		loop{
			AnimationB=0;
			AnimationC=0;
        		loop(10){yield;}
			AnimationB=1;
        		loop(10){yield;}
			AnimationB=2;
        		loop(10){yield;}
			}
		}
}