#Title[さとり登場]
#Text[古明地さとりの登場]
#BackGround[User]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main
{
        let count=0;
        let csd=GetCurrentScriptDirectory;
        let imgBoss=csd~"img\Exsatori.png";

    @Initialize {
        SetLife(1);
        SetTimer(999);
        SetDamageRate(100,100);

	SetX(498);
	SetY(-50);
	LoadGraphic(imgBoss);
	SetEnemyMarker(true);
	SetMovePosition02(GetCenterX,150,125);
        SetInvincibility(200);
	LoadGraphic(imgBoss);
    }

        @MainLoop
        {
		if(count>125){
		AddLife(-1000);
		}
        	count++;
}
    @Finalize {
		DeleteGraphic(imgBoss);
    }

        @DrawLoop {
		SetRenderState(ALPHA);
		SetTexture(imgBoss);
		SetGraphicScale(1,1);
		SetAlpha(255);
		SetColor(255,255,255);
		if(int(GetSpeedX())==0)
		{SetGraphicRect(128,0,255,127);}
		else if(GetSpeedX()>0){SetGraphicRect(384,0,511,127);}
		else if(GetSpeedX()<0){SetGraphicRect(256,0,383,127);}
		DrawGraphic(GetX(),GetY());
	}
}
